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


C# DataHandler.ExecuteSQLWithStringReturnVal方法代码示例

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


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

示例1: InsertUnit


//.........这里部分代码省略.........
                paramertList.Add(new object[] { "@length", unit.Length });
                paramertList.Add(new object[] { "@hitch_style", unit.HitchStyle });
                paramertList.Add(new object[] { "@speed", unit.Speed });
                paramertList.Add(new object[] { "@trailer_id", unit.TrailerId });
                paramertList.Add(new object[] { "@engine_serial", unit.EngineSerial });
                IDNumber = unit.snowmobile.IdentificationNumber;
            }
            else if (unit.UnitTypeId == 8)
            {
                paramertList.Add(new object[] { "@identification_number", unit.heavyequipment.SerialNumber });
                paramertList.Add(new object[] { "@year", unit.heavyequipment.Year });
                paramertList.Add(new object[] { "@make", unit.heavyequipment.Make });
                paramertList.Add(new object[] { "@model", "" });
                paramertList.Add(new object[] { "@color", unit.Color });
                paramertList.Add(new object[] { "@trim", unit.Trim });
                paramertList.Add(new object[] { "@miles", unit.Miles });
                paramertList.Add(new object[] { "@new_or_used", unit.NewOrUsed });
                paramertList.Add(new object[] { "@length", unit.Length });
                paramertList.Add(new object[] { "@hitch_style", unit.HitchStyle });
                paramertList.Add(new object[] { "@speed", unit.Speed });
                paramertList.Add(new object[] { "@trailer_id", unit.TrailerId });
                paramertList.Add(new object[] { "@engine_serial", unit.EngineSerial });
                IDNumber = unit.heavyequipment.SerialNumber;
            }
            else
            {
                paramertList.Add(new object[] { "@identification_number", unit.IdentificationNumber });
                paramertList.Add(new object[] { "@year", unit.Year });
                paramertList.Add(new object[] { "@make", unit.Make });
                paramertList.Add(new object[] { "@model", unit.Model });
                paramertList.Add(new object[] { "@color", unit.Color });
                paramertList.Add(new object[] { "@trim", unit.Trim });
                paramertList.Add(new object[] { "@miles", unit.Miles });
                paramertList.Add(new object[] { "@new_or_used", unit.NewOrUsed });
                paramertList.Add(new object[] { "@length", unit.Length });
                paramertList.Add(new object[] { "@hitch_style", unit.HitchStyle });
                paramertList.Add(new object[] { "@speed", unit.Speed });
                paramertList.Add(new object[] { "@trailer_id", unit.TrailerId });
                paramertList.Add(new object[] { "@engine_serial", unit.EngineSerial });
                IDNumber = unit.IdentificationNumber;
            }

            paramertList.Add(new object[] { "@cost", unit.Cost });
            paramertList.Add(new object[] { "@advance_amount", unit.AdvanceAmount });

            if (unit.TitleReceived == "Yes")
            {
                unit.TitleStatus = 1;
            }
            else
            {
                unit.TitleStatus = 0;
            }
            paramertList.Add(new object[] { "@title_status", unit.TitleStatus });
            paramertList.Add(new object[] { "@note", unit.Note });
            paramertList.Add(new object[] { "@add_or_advance", unit.AddAndAdvance });
            paramertList.Add(new object[] { "@is_advanced", unit.IsAdvanced });
            if (unit.IsAdvanced == true)
            {
                unit.UnitStatus = 1;
                paramertList.Add(new object[] { "@advance_date", unit.AdvanceDate });

            }
            else {
                unit.UnitStatus = 0;
                paramertList.Add(new object[] { "@advance_date", null });
            }
            paramertList.Add(new object[] { "@unit_status", unit.UnitStatus });
            paramertList.Add(new object[] { "@is_approved", unit.IsApproved });
            paramertList.Add(new object[] { "@status", unit.Status });

            try
            {
                string val = dataHandler.ExecuteSQLWithStringReturnVal("spInsertUnitDetailsRoleBack", paramertList);


                if (!string.IsNullOrEmpty(val) && unit.AddAndAdvance)
                {
                    unit.UnitId = val;
                    if (this.GetLoanCurtailmentDetails(unit.LoanId, unit.UnitId, unit.AdvanceDate, unit.AdvanceAmount, unit.Cost))
                    {
                        return val;
                    }
                    else
                    {
                        return "";
                    }
                }
                else if (!string.IsNullOrEmpty(val)) {
                    return val;
                }
                else {
                    return "";
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
开发者ID:kasunsamarawickrama,项目名称:BankLoanSystem,代码行数:101,代码来源:UnitAccess.cs

示例2: updateCurtailmets

        internal string updateCurtailmets(SelectedCurtailmentList curtailmentScheduleModel, int loanId, string dealerEmail)
        {
            try
            {
                int i = 1;
                XElement xEle = new XElement("Curtailments",
                    from curtailmentShedule in curtailmentScheduleModel.SelectedCurtailmentSchedules
                    select new XElement("CurtailmentShedule",
                        new XElement("CurtNo", curtailmentShedule.CurtNumber),
                        new XElement("UnitId", curtailmentShedule.UnitId),
                        new XElement("CurtAmount", curtailmentShedule.CurtAmount),
                        new XElement("PayDate", curtailmentShedule.PayDate),
                        new XElement("id", i++)
                        ));
                string xmlDoc = xEle.ToString();


                DataHandler dataHandler = new DataHandler();
                List<object[]> paramertList2 = new List<object[]>();
                paramertList2.Add(new object[] { "@loan_id", loanId });
                paramertList2.Add(new object[] { "@dealer_email", dealerEmail ?? ""});
                paramertList2.Add(new object[] { "@Input", xmlDoc });


                return dataHandler.ExecuteSQLWithStringReturnVal("spUpdateCurtailmentSchedule", paramertList2);


            }
            catch (Exception ex)
            {
                throw ex;
            }

        }
开发者ID:kasunsamarawickrama,项目名称:BankLoanSystem,代码行数:34,代码来源:CurtailmentAccess.cs


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