Exemplo n.º 1
0
        public string GetCodeDetailDescription(com.Sconit.CodeMaster.CodeMaster code, string value)
        {
            if (codeMasterCache == null)
            {
                LoadCodeDetailCache();
            }

            if (codeMasterCache.ContainsKey(code))
            {
                CodeDetail codeDetail = codeMasterCache[code].Where(det => det.Value == value).SingleOrDefault();
                if (codeDetail != null)
                {
                    string desc = Resources.CodeDetail.ResourceManager.GetString(codeDetail.Description);
                    if (desc != null)
                    {
                        return(desc);
                    }
                    else
                    {
                        return(codeDetail.Description);
                        //throw new TechnicalException("Description define not correct of codeMaster [" + code + "] and value [" + value + "].");
                    }
                }
                else
                {
                    //throw new TechnicalException("CodeMaster [" + code + "] does not contain value [" + value + "].");
                    return(Resources.CodeDetail.Errors_CodeDetail_ValueNotFound);
                }
            }
            else
            {
                throw new TechnicalException("CodeMaster [" + code + "] does not exist.");
            }
        }
Exemplo n.º 2
0
        public int CompareTo(RealaseProduct other)
        {
            const StringComparison comparisonIgnoreCase = StringComparison.OrdinalIgnoreCase;

            if (ReferenceEquals(this, other))
            {
                return(0);
            }

            if (ReferenceEquals(null, other))
            {
                return(1);
            }
            var codeDetailComparison = CodeDetail.CompareTo(other.CodeDetail);

            if (codeDetailComparison != 0)
            {
                return(codeDetailComparison);
            }
            var realaseComparison = Realase.CompareTo(other.Realase);

            if (realaseComparison != 0)
            {
                return(realaseComparison);
            }
            var nameComparison = string.Compare(Name, other.Name, comparisonIgnoreCase);

            if (nameComparison != 0)
            {
                return(nameComparison);
            }
            return(string.Compare(Mark, other.Mark, comparisonIgnoreCase));
        }
Exemplo n.º 3
0
        public async Task <ActionResult <CodeDetail> > PostCodeDetail(CodeDetail CodeDetail)
        {
            _context.CodeDetails.Add(CodeDetail);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetCodeDetail", new { id = CodeDetail.CId }, CodeDetail));
        }
        public int CompareTo(DetailCalculate other)
        {
            const StringComparison comparisonIgnoreCase = StringComparison.OrdinalIgnoreCase;

            if (ReferenceEquals(this, other))
            {
                return(0);
            }

            if (ReferenceEquals(null, other))
            {
                return(1);
            }
            var codeProductComparison = CodeDetail.CompareTo(other.CodeDetail);

            if (codeProductComparison != 0)
            {
                return(codeProductComparison);
            }
            var nameComparison = string.Compare(Name, other.Name, comparisonIgnoreCase);

            if (nameComparison != 0)
            {
                return(nameComparison);
            }
            var markComparison = string.Compare(Mark, other.Mark, comparisonIgnoreCase);

            if (markComparison != 0)
            {
                return(markComparison);
            }
            return(IsCalculate.CompareTo(other.IsCalculate));
        }
Exemplo n.º 5
0
        public IHttpActionResult SaveCodeType([FromBody] CodeDetail codes)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    var exist = _strepo.Exist(codes.ItemCodeID, codes.CodeTypeID).ToList();
                    if (exist.Count == 0)
                    {
                        codes.GlobalID = Guid.NewGuid();
                        codes.SourceID = "U";
                        _strepo.SaveCodeDetail(codes);
                        //Save to database
                        _strepo.Save();
                    }

                    return(Json(new { success = true }));
                    //Json(Mapper.Map<SRStudentNewViewModel>(newStudent));
                }
            }
            catch (System.Data.Entity.Validation.DbEntityValidationException dbex)
            {
                return(Json(new { Message = ValidationErrorMsg(dbex) }));
            }
            //catch (Exception ex)
            //{
            //    ModelState.Values.SelectMany(x => x.Errors.Select(e => e.ErrorMessage));
            //    return Json(new { Message = ex.Message });
            //}
            return(Json(new { Message = "Failed", ModelState = ModelState }));
        }
Exemplo n.º 6
0
        public IActionResult PutCodeDetail(long id, CodeDetail codeDetail)
        {
            if (id != codeDetail.Id)
            {
                return(BadRequest());
            }
            codeDetail.LastUpdatedDateTime   = DateTime.Now;
            _context.Entry(codeDetail).State = EntityState.Modified;

            try
            {
                _context.SaveChanges();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!CodeDetailExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
        private static void AssignMatchingCodesByParameterTypes(CodeDetail code, List <CodeDetail> codesInAssembly, List <List <CodeDetail> > codeGroups)
        {
            foreach (List <CodeDetail> codesInAssemblyTest in codeGroups)
            {
                if (!object.ReferenceEquals(codesInAssembly, codesInAssemblyTest))
                {
                    foreach (CodeDetail codeTest in codesInAssemblyTest)
                    {
                        if (!object.ReferenceEquals(code, codeTest))
                        {
                            if (codeTest.AlignMatchStatus < AlignMatchStatus.Exact)
                            {
                                if (code.ParameterTypesList == codeTest.ParameterTypesList)
                                {
                                    codeTest.AlignmentIdentifier = code.AlignmentIdentifier;
                                    codeTest.AlignMatchStatus    = AlignMatchStatus.Exact;
                                    code.AlignMatchStatus        = AlignMatchStatus.Exact;

                                    break;
                                }
                            }
                        }
                    }
                }
            }
        }
        private static void AssignAnyCode(CodeDetail code, List <CodeDetail> codesInAssembly, List <List <CodeDetail> > codeGroups)
        {
            foreach (List <CodeDetail> codesInAssemblyTest in codeGroups)
            {
                if (!object.ReferenceEquals(codesInAssembly, codesInAssemblyTest))
                {
                    foreach (CodeDetail codeTest in codesInAssemblyTest)
                    {
                        if (!object.ReferenceEquals(code, codeTest))
                        {
                            if (codeTest.AlignMatchStatus < AlignMatchStatus.Weak)
                            {
                                if (code.AlignMatchStatus > AlignMatchStatus.Weak)
                                {
                                    throw new WeakerMatchException();                                     // attempting to rematch at a lower strength?
                                }

                                codeTest.AlignmentIdentifier = code.AlignmentIdentifier;
                                codeTest.AlignMatchStatus    = AlignMatchStatus.Weak;
                                code.AlignMatchStatus        = AlignMatchStatus.Weak;

                                break;
                            }
                        }
                    }
                }
            }
        }
Exemplo n.º 9
0
        public async Task <IActionResult> PutCodeDetail(int id, CodeDetail CodeDetail)
        {
            if (id != CodeDetail.CId)
            {
                return(BadRequest());
            }
            _context.Entry(CodeDetail).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!CodeDetailExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
Exemplo n.º 10
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = CodeDetail.GetHashCode();
         hashCode = (hashCode * 397) ^ (NameDetail != null ? StringComparer.OrdinalIgnoreCase.GetHashCode(NameDetail) : 0);
         hashCode = (hashCode * 397) ^ (OboznDetail != null ? StringComparer.OrdinalIgnoreCase.GetHashCode(OboznDetail) : 0);
         hashCode = (hashCode * 397) ^ Operac.GetHashCode();
         hashCode = (hashCode * 397) ^ WorkGuildId.GetHashCode();
         hashCode = (hashCode * 397) ^ AreaId.GetHashCode();
         hashCode = (hashCode * 397) ^ TehnoperId.GetHashCode();
         hashCode = (hashCode * 397) ^ (NameTehnoper != null ? StringComparer.OrdinalIgnoreCase.GetHashCode(NameTehnoper) : 0);
         hashCode = (hashCode * 397) ^ Koefvr.GetHashCode();
         hashCode = (hashCode * 397) ^ ProfId.GetHashCode();
         hashCode = (hashCode * 397) ^ (NameProf != null ? StringComparer.OrdinalIgnoreCase.GetHashCode(NameProf) : 0);
         hashCode = (hashCode * 397) ^ Kolrab.GetHashCode();
         hashCode = (hashCode * 397) ^ Razr.GetHashCode();
         hashCode = (hashCode * 397) ^ Koldet.GetHashCode();
         hashCode = (hashCode * 397) ^ Ednorm.GetHashCode();
         hashCode = (hashCode * 397) ^ Tarset.GetHashCode();
         hashCode = (hashCode * 397) ^ Vidnorm.GetHashCode();
         hashCode = (hashCode * 397) ^ Razmpart.GetHashCode();
         hashCode = (hashCode * 397) ^ Tpz.GetHashCode();
         hashCode = (hashCode * 397) ^ Vst.GetHashCode();
         hashCode = (hashCode * 397) ^ Koefneos.GetHashCode();
         hashCode = (hashCode * 397) ^ Vstk.GetHashCode();
         hashCode = (hashCode * 397) ^ Rstk.GetHashCode();
         hashCode = (hashCode * 397) ^ (Nomizv != null ? StringComparer.OrdinalIgnoreCase.GetHashCode(Nomizv) : 0);
         hashCode = (hashCode * 397) ^ DateIzv.GetHashCode();
         return(hashCode);
     }
 }
Exemplo n.º 11
0
        public ActionResult <CodeDetail> PostCodeDetail(CodeDetail codeDetail)
        {
            codeDetail.CreatedDateTime = DateTime.Now;
            //codeDetail.LastUpdatedDateTime = DateTime.Now;
            _context.CodeDetail.Add(codeDetail);
            _context.SaveChanges();

            return(codeDetail);
        }
Exemplo n.º 12
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = CodeDetail.GetHashCode();
         hashCode = (hashCode * 397) ^ (Name != null ? StringComparer.OrdinalIgnoreCase.GetHashCode(Name) : 0);
         hashCode = (hashCode * 397) ^ (Mark != null ? StringComparer.OrdinalIgnoreCase.GetHashCode(Mark) : 0);
         return(hashCode);
     }
 }
Exemplo n.º 13
0
        public IList <CodeDetail> GetCodeDetails(com.Sconit.CodeMaster.CodeMaster code, bool?includeBlankOption, string blankOptionDescription, string blankOptionValue)
        {
            IList <CodeDetail> codeDetailList = this.GetCodeDetails(code);

            if (includeBlankOption.HasValue && includeBlankOption.Value)
            {
                CodeDetail blankCodeDetail = new CodeDetail();
                blankCodeDetail.Description = blankOptionDescription != null ? blankOptionDescription : string.Empty;
                blankCodeDetail.Value       = blankOptionValue != null ? blankOptionValue : string.Empty;
                codeDetailList.Insert(0, blankCodeDetail);
            }

            return(codeDetailList);
        }
Exemplo n.º 14
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = CodeDetail.GetHashCode();
         hashCode = (hashCode * 397) ^ (Name != null ? StringComparer.OrdinalIgnoreCase.GetHashCode(Name) : 0);
         hashCode = (hashCode * 397) ^ (Mark != null ? StringComparer.OrdinalIgnoreCase.GetHashCode(Mark) : 0);
         hashCode = (hashCode * 397) ^ IsPrintFabrik.GetHashCode();
         hashCode = (hashCode * 397) ^ IsPrintWorkGuild.GetHashCode();
         hashCode = (hashCode * 397) ^ IsPrintWorkGuild02.GetHashCode();
         hashCode = (hashCode * 397) ^ IsPrintWorkGuild03.GetHashCode();
         hashCode = (hashCode * 397) ^ IsPrintWorkGuild04.GetHashCode();
         hashCode = (hashCode * 397) ^ IsPrintWorkGuild05.GetHashCode();
         return(hashCode);
     }
 }
Exemplo n.º 15
0
 public List <CodeDetail> GetCodeDetail(QueryBO objQuery)
 {
     try
     {
         lstObject = new List <CodeDetail>();
         using (con = DBconnection.ConnectToDB())
         {
             objcmd             = new SqlCommand();
             objcmd.Connection  = con;
             objcmd.CommandType = CommandType.StoredProcedure;
             objcmd.CommandText = "STP_SelectCodeDetail";
             objcmd.Parameters.Add(new SqlParameter("@PageNumber", objQuery.PageNumber));
             objcmd.Parameters.Add(new SqlParameter("@PageSize", objQuery.PageSize));
             objcmd.Parameters.Add(new SqlParameter("@Filter", objQuery.Filter));
             objcmd.Parameters.Add(new SqlParameter("@Sort", objQuery.Sort));
             objcmd.Parameters.Add(new SqlParameter("@TotalRecords", SqlDbType.Int)).Direction = ParameterDirection.Output;
             reader = objcmd.ExecuteReader();
             if (reader != null && reader.HasRows)
             {
                 while (reader.Read())
                 {
                     obj = new CodeDetail();
                     obj.CodeDetailId    = Convert.ToInt64("0" + reader["CodeDetailId"]);
                     obj.CodeTypeId      = Convert.ToInt32("0" + reader["CodeTypeId"]);
                     obj.DetailLongDesc  = Convert.ToString("" + reader["DetailLongDesc"]);
                     obj.DetailShortDesc = Convert.ToString("" + reader["DetailShortDesc"]);
                     obj.ParentId        = Convert.ToInt64("0" + reader["ParentId"]);
                     obj.Status          = Convert.ToBoolean(reader["Status"]);
                     lstObject.Add(obj);
                 }
             }
         }
         objQuery.TotalRecords = Convert.ToInt32(objcmd.Parameters["@TotalRecords"].Value);
     }
     catch (Exception ex)
     {
         throw ex;
     }
     finally
     {
         reader.Dispose();
         objcmd = null;
         con    = null;
     }
     return(lstObject);
 }
Exemplo n.º 16
0
        public static List <CodeDetail> PopulateCodeDetails(List <string> bogusData)
        {
            List <CodeDetail> codeDetails = new List <CodeDetail>();

            CodeDetail codeDetail = new CodeDetail();

            List <string> generatedData = bogusData;

            codeDetail.DateNow        = Date.ToString("dd/MM/yyyy");
            codeDetail.FirstName      = generatedData[0];
            codeDetail.LastName       = generatedData[1];
            codeDetail.Login          = generatedData[2];
            codeDetail.Password       = generatedData[3];
            codeDetail.SecretQuestion = generatedData[4];
            codeDetail.SecretAnswer   = generatedData[5];
            codeDetails.Add(codeDetail);

            return(codeDetails);
        }
Exemplo n.º 17
0
        public List <CityMaster> GetCityList(TableFilter objQuery)
        {
            List <CityMaster> lstObject = null;
            CityMaster        obj       = null;

            try
            {
                lstObject = new List <CityMaster>();
                using (con = DBconnection.ConnectToDB())
                {
                    objcmd            = new SqlCommand();
                    objcmd.Connection = con;
                    reader            = sdr(objcmd, objQuery);
                    if (reader != null && reader.HasRows)
                    {
                        while (reader.Read())
                        {
                            obj          = new CityMaster();
                            obj.CityID   = Convert.ToInt64("0" + reader["CityID"]);
                            obj.CityName = Convert.ToString("" + reader["CityName"]);
                            lstObject.Add(obj);
                        }
                    }
                }
                // objQuery.TotalRecords = Convert.ToInt32(objcmd.Parameters["@TotalRecords"].Value);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                reader.Dispose();
                objcmd = null;
                con    = null;
            }
            return(lstObject);
        }
Exemplo n.º 18
0
        public ActionResult Update(int id, string value, int Sequence, bool isDefault)
        {
            CodeDetail CodeDetail = base.genericMgr.FindById <CodeDetail>((int)id);

            CodeDetail.Value     = value;
            CodeDetail.Sequence  = Sequence;
            CodeDetail.IsDefault = isDefault;
            if (isDefault)
            {
                base.genericMgr.Update("update CodeDetail as d set d.IsDefault=false where d.Code = ? ", CodeDetail.Code);
            }

            base.genericMgr.Update(CodeDetail);

            IList <CodeDetail> codeDetailList = base.genericMgr.FindAll <CodeDetail>("select d from CodeDetail as d where d.Code = ?", CodeDetail.Code);

            foreach (CodeDetail codeDetail in codeDetailList)
            {
                string description = Resources.CodeDetail.ResourceManager.GetString(codeDetail.Description);
                codeDetail.Description = description != null ? description : codeDetail.Description;
            }
            return(View(new GridModel(codeDetailList)));
        }
Exemplo n.º 19
0
 public void SaveCodeDetail(CodeDetail code)
 {
     _entities.CodeDetails.Add(code);
 }
Exemplo n.º 20
0
        public ActionResult _CodeMasterDropDownList(com.Sconit.CodeMaster.CodeMaster code, string controlName, string controlId, string selectedValue, string ajaxActionName, bool?isSupplier,
                                                    //string[] parentCascadeControlNames, string[] cascadingControlNames,
                                                    bool?includeBlankOption, string blankOptionDescription, string blankOptionValue, bool?enable, bool?isConsignment, bool?isShowNA, int?orderType)
        {
            IList <CodeDetail> codeDetailList = systemMgr.GetCodeDetails(code, includeBlankOption, blankOptionDescription, blankOptionValue);

            //IList<object> para = new List<object>();
            //para.Add(com.Sconit.CodeMaster.CodeMaster.OrderStatus);
            //para.Add((int)com.Sconit.CodeMaster.OrderStatus.Create);
            //codeDetailList = systemMgr.GetCodeDetails(code, includeBlankOption, blankOptionDescription, blankOptionValue);
            //IList<CodeDetail> codeDetail = base.genericMgr.FindAll<CodeDetail>("from CodeDetail c where c.Code  = ? and c.Value=?", para.ToArray());
            //if (codeDetail.Count > 0)
            //{
            //    codeDetailList.Remove(codeDetail[0]);
            //}
            //    if (codeDetailList != null && codeDetailList.Count > 0)
            //    {
            //        codeDetailList = codeDetailList.Where(q => q.Value != ((int)com.Sconit.CodeMaster.OrderStatus.Create).ToString()).ToList();
            //    }
            //}
            //else
            //{

            if (isSupplier != null && isSupplier.Value)
            {
                codeDetailList = codeDetailList.Where(q => q.Value != ((int)com.Sconit.CodeMaster.OrderStatus.Create).ToString()).ToList();
            }
            //base.genericMgr.FindAll<CodeDetail>("from CodeDetail c where c.code = 'OrderStatus' and c.value in ('1','2')");
            //systemMgr.GetCodeDetails(code, includeBlankOption, blankOptionDescription, blankOptionValue);
            //采购路线中的结算方式 不显示寄售结算
            if (isConsignment != null)
            {
                if (code == com.Sconit.CodeMaster.CodeMaster.BillTerm)
                {
                    if ((bool)isConsignment)
                    {
                        // codeDetailList = base.genericMgr.FindAll<CodeDetail>("from CodeDetail c where c.Description in ('" + "CodeDetail_BillTerm_BAC" + "','" + "CodeDetail_BillTerm_NA" + "','" + "CodeDetail_BillTerm_BAR" + "') order by c.Sequence");
                        codeDetailList = codeDetailList.Where(p => p.Value == ((int)com.Sconit.CodeMaster.OrderBillTerm.ConsignmentBilling).ToString() || p.Value == ((int)com.Sconit.CodeMaster.OrderBillTerm.NA).ToString() || p.Value == ((int)com.Sconit.CodeMaster.OrderBillTerm.ReceivingSettlement).ToString()).ToList();
                    }
                    else
                    {
                        codeDetailList = codeDetailList.Where(p => p.Value != ((int)com.Sconit.CodeMaster.OrderBillTerm.ConsignmentBilling).ToString()).ToList();
                    }
                    if (isShowNA != null)
                    {
                        if (!(bool)isShowNA)
                        {
                            codeDetailList = codeDetailList.Where(p => p.Value != ((int)com.Sconit.CodeMaster.OrderBillTerm.NA).ToString()).ToList();
                            //IList<CodeDetail> codeDetail = base.genericMgr.FindAll<CodeDetail>("from CodeDetail c where c.Description = ?", "CodeDetail_BillTerm_NA");
                            //if (codeDetail.Count > 0)
                            //{
                            //    codeDetailList.Remove(codeDetail[0]);
                            //}
                        }
                    }
                }
            }

            //收货和发货的OrderType 不显示销售和生产
            if (code == com.Sconit.CodeMaster.CodeMaster.OrderType)
            {
                //if (controlName == "GoodsReceiptOrderType" || controlName == "IpOrderType")
                //{
                //    IList<CodeDetail> codeDetail = base.genericMgr.FindAll<CodeDetail>("from CodeDetail c where c.Description = ? or c.Description=?",
                //        new object[] { "CodeDetail_OrderType_Distribution", "CodeDetail_OrderType_Production" });
                //    if (codeDetail.Count > 0)
                //    {
                //        for (int i = 0; i < codeDetail.Count; i++)
                //        {
                //            codeDetailList.Remove(codeDetail[i]);
                //        }
                //    }
                //}
                if (orderType != null)
                {
                    codeDetailList = systemMgr.GetCodeDetails(code);
                    if (orderType.Value == (int)com.Sconit.CodeMaster.OrderType.Production)
                    {
                        codeDetailList = codeDetailList.Where(p => p.Value == ((int)com.Sconit.CodeMaster.OrderType.Production).ToString()).ToList();
                        //   base.genericMgr.FindAll<CodeDetail>("from CodeDetail as c where c.Code = ? and c.Value = ?", new object[] { com.Sconit.CodeMaster.CodeMaster.OrderType.ToString(), (int)com.Sconit.CodeMaster.OrderType.Production });
                    }
                    if (orderType.Value == (int)com.Sconit.CodeMaster.OrderType.Procurement)
                    {
                        if (isSupplier != null && isSupplier.Value)
                        {
                            codeDetailList = codeDetailList.Where(p => p.Value == ((int)com.Sconit.CodeMaster.OrderType.Procurement).ToString() || p.Value == ((int)com.Sconit.CodeMaster.OrderType.CustomerGoods).ToString() || p.Value == ((int)com.Sconit.CodeMaster.OrderType.SubContract).ToString()).ToList();
                            //base.genericMgr.FindAll<CodeDetail>("from CodeDetail as c where c.Code = ? and c.Value in (?,?,?)", new object[] { com.Sconit.CodeMaster.CodeMaster.OrderType.ToString(), (int)com.Sconit.CodeMaster.OrderType.Procurement, (int)com.Sconit.CodeMaster.OrderType.CustomerGoods, (int)com.Sconit.CodeMaster.OrderType.SubContract });
                        }
                        else
                        {
                            codeDetailList = codeDetailList.Where(p => p.Value == ((int)com.Sconit.CodeMaster.OrderType.Procurement).ToString() || p.Value == ((int)com.Sconit.CodeMaster.OrderType.CustomerGoods).ToString() || p.Value == ((int)com.Sconit.CodeMaster.OrderType.Transfer).ToString() || p.Value == ((int)com.Sconit.CodeMaster.OrderType.SubContractTransfer).ToString() || p.Value == ((int)com.Sconit.CodeMaster.OrderType.ScheduleLine).ToString()).ToList();
                            // codeDetailList = base.genericMgr.FindAll<CodeDetail>("from CodeDetail as c where c.Code = ? and c.Value in (?,?,?,?,?,?)", new object[] { com.Sconit.CodeMaster.CodeMaster.OrderType.ToString(), (int)com.Sconit.CodeMaster.OrderType.Procurement, (int)com.Sconit.CodeMaster.OrderType.SubContract, (int)com.Sconit.CodeMaster.OrderType.CustomerGoods, (int)com.Sconit.CodeMaster.OrderType.Transfer, (int)com.Sconit.CodeMaster.OrderType.SubContractTransfer, (int)com.Sconit.CodeMaster.OrderType.ScheduleLine });
                        }
                    }
                    if (orderType.Value == (int)com.Sconit.CodeMaster.OrderType.Distribution)
                    {
                        codeDetailList = codeDetailList.Where(p => p.Value == ((int)com.Sconit.CodeMaster.OrderType.Distribution).ToString() || p.Value == ((int)com.Sconit.CodeMaster.OrderType.Transfer).ToString() || p.Value == ((int)com.Sconit.CodeMaster.OrderType.SubContractTransfer).ToString()).ToList();
                        //base.genericMgr.FindAll<CodeDetail>("from CodeDetail as c where c.Code = ? and c.Value in (?,?,?)", new object[] { com.Sconit.CodeMaster.CodeMaster.OrderType.ToString(), (int)com.Sconit.CodeMaster.OrderType.Distribution, (int)com.Sconit.CodeMaster.OrderType.Transfer, (int)com.Sconit.CodeMaster.OrderType.SubContractTransfer });
                    }

                    #region empty codedetail
                    CodeDetail emptyCodeDetail = new CodeDetail();
                    emptyCodeDetail.Value       = blankOptionValue;
                    emptyCodeDetail.Description = blankOptionDescription;
                    codeDetailList.Insert(0, emptyCodeDetail);
                    #endregion
                }
            }
            ViewBag.ControlName = controlName;
            ViewBag.ControlId   = controlId;
            //ViewBag.SelectedValue = selectedValue;
            ViewBag.AjaxActionName = ajaxActionName;

            ViewBag.Enable = enable;
            // codeDetailList.Add(new CodeDetail());
            //ViewBag.CascadingControlNames = cascadingControlNames;
            //ViewBag.ParentCascadeControlNames = parentCascadeControlNames;
            if (code == com.Sconit.CodeMaster.CodeMaster.FlowStrategy)
            {
                codeDetailList = codeDetailList.Where(c => c.Description != "CodeDetail_FlowStrategy_NA").ToList();
            }
            return(PartialView(base.Transfer2DropDownList(code, codeDetailList, selectedValue)));
        }
Exemplo n.º 21
0
        public int CompareTo(DetailPrint other)
        {
            const StringComparison comparisonIgnoreCase = StringComparison.OrdinalIgnoreCase;

            if (ReferenceEquals(this, other))
            {
                return(0);
            }

            if (ReferenceEquals(null, other))
            {
                return(1);
            }
            var codeDetailComparison = CodeDetail.CompareTo(other.CodeDetail);

            if (codeDetailComparison != 0)
            {
                return(codeDetailComparison);
            }
            var nameComparison = string.Compare(Name, other.Name, comparisonIgnoreCase);

            if (nameComparison != 0)
            {
                return(nameComparison);
            }
            var markComparison = string.Compare(Mark, other.Mark, comparisonIgnoreCase);

            if (markComparison != 0)
            {
                return(markComparison);
            }
            var isFabrikComparison = IsPrintFabrik.CompareTo(other.IsPrintFabrik);

            if (isFabrikComparison != 0)
            {
                return(isFabrikComparison);
            }
            var isWorkGuildComparison = IsPrintWorkGuild.CompareTo(other.IsPrintWorkGuild);

            if (isWorkGuildComparison != 0)
            {
                return(isWorkGuildComparison);
            }
            var isWorkGuild02Comparison = IsPrintWorkGuild02.CompareTo(other.IsPrintWorkGuild02);

            if (isWorkGuild02Comparison != 0)
            {
                return(isWorkGuild02Comparison);
            }
            var isWorkGuild03Comparison = IsPrintWorkGuild03.CompareTo(other.IsPrintWorkGuild03);

            if (isWorkGuild03Comparison != 0)
            {
                return(isWorkGuild03Comparison);
            }
            var isWorkGuild04Comparison = IsPrintWorkGuild04.CompareTo(other.IsPrintWorkGuild04);

            if (isWorkGuild04Comparison != 0)
            {
                return(isWorkGuild04Comparison);
            }
            return(IsPrintWorkGuild05.CompareTo(other.IsPrintWorkGuild05));
        }
Exemplo n.º 22
0
        public int CompareTo(CancelledDetail other)
        {
            const StringComparison ordinalIgnoreCase = StringComparison.OrdinalIgnoreCase;

            if (ReferenceEquals(this, other))
            {
                return(0);
            }

            if (ReferenceEquals(null, other))
            {
                return(1);
            }
            var codeDetailComparison = CodeDetail.CompareTo(other.CodeDetail);

            if (codeDetailComparison != 0)
            {
                return(codeDetailComparison);
            }
            var nameDetailComparison = string.Compare(NameDetail, other.NameDetail, ordinalIgnoreCase);

            if (nameDetailComparison != 0)
            {
                return(nameDetailComparison);
            }
            var oboznDetailComparison = string.Compare(OboznDetail, other.OboznDetail, ordinalIgnoreCase);

            if (oboznDetailComparison != 0)
            {
                return(oboznDetailComparison);
            }
            var operacComparison = Operac.CompareTo(other.Operac);

            if (operacComparison != 0)
            {
                return(operacComparison);
            }
            var workGuildIdComparison = WorkGuildId.CompareTo(other.WorkGuildId);

            if (workGuildIdComparison != 0)
            {
                return(workGuildIdComparison);
            }
            var areaIdComparison = AreaId.CompareTo(other.AreaId);

            if (areaIdComparison != 0)
            {
                return(areaIdComparison);
            }
            var tehnoperIdComparison = TehnoperId.CompareTo(other.TehnoperId);

            if (tehnoperIdComparison != 0)
            {
                return(tehnoperIdComparison);
            }
            var nameTehnoperComparison = string.Compare(NameTehnoper, other.NameTehnoper, ordinalIgnoreCase);

            if (nameTehnoperComparison != 0)
            {
                return(nameTehnoperComparison);
            }
            var koefvrComparison = Koefvr.CompareTo(other.Koefvr);

            if (koefvrComparison != 0)
            {
                return(koefvrComparison);
            }
            var profIdComparison = ProfId.CompareTo(other.ProfId);

            if (profIdComparison != 0)
            {
                return(profIdComparison);
            }
            var nameProfComparison = string.Compare(NameProf, other.NameProf, ordinalIgnoreCase);

            if (nameProfComparison != 0)
            {
                return(nameProfComparison);
            }
            var kolrabComparison = Kolrab.CompareTo(other.Kolrab);

            if (kolrabComparison != 0)
            {
                return(kolrabComparison);
            }
            var razrComparison = Razr.CompareTo(other.Razr);

            if (razrComparison != 0)
            {
                return(razrComparison);
            }
            var koldetComparison = Koldet.CompareTo(other.Koldet);

            if (koldetComparison != 0)
            {
                return(koldetComparison);
            }
            var ednormComparison = Ednorm.CompareTo(other.Ednorm);

            if (ednormComparison != 0)
            {
                return(ednormComparison);
            }
            var tarsetComparison = Tarset.CompareTo(other.Tarset);

            if (tarsetComparison != 0)
            {
                return(tarsetComparison);
            }
            var vidnormComparison = Vidnorm.CompareTo(other.Vidnorm);

            if (vidnormComparison != 0)
            {
                return(vidnormComparison);
            }
            var razmpartComparison = Razmpart.CompareTo(other.Razmpart);

            if (razmpartComparison != 0)
            {
                return(razmpartComparison);
            }
            var tpzComparison = Tpz.CompareTo(other.Tpz);

            if (tpzComparison != 0)
            {
                return(tpzComparison);
            }
            var vstComparison = Vst.CompareTo(other.Vst);

            if (vstComparison != 0)
            {
                return(vstComparison);
            }
            var koefneosComparison = Koefneos.CompareTo(other.Koefneos);

            if (koefneosComparison != 0)
            {
                return(koefneosComparison);
            }
            var vstkComparison = Vstk.CompareTo(other.Vstk);

            if (vstkComparison != 0)
            {
                return(vstkComparison);
            }
            var rstkComparison = Rstk.CompareTo(other.Rstk);

            if (rstkComparison != 0)
            {
                return(rstkComparison);
            }
            var nomizvComparison = string.Compare(Nomizv, other.Nomizv, ordinalIgnoreCase);

            if (nomizvComparison != 0)
            {
                return(nomizvComparison);
            }
            return(DateIzv.CompareTo(other.DateIzv));
        }