/// <summary> /// Method to Get List of Koko Charges /// </summary> /// <param name="argEn">Koko Charges Entity is an Input.</param> /// <returns>Returns List of FeeTypes</returns> public List <FeeTypesEn> GetKokoListddl(FeeTypesEn argEn) { try { FeeTypesDAL loDs = new FeeTypesDAL(); return(loDs.GetKokoListddl(argEn)); } catch (Exception ex) { throw ex; } }
/// <summary> /// Method to Get FeeTypes Entity /// </summary> /// <param name="argEn">FeeTypes Entity is an Input.FeeTypeCode ia an Input Property</param> /// <returns>Returns FeeTypes Entity</returns> public FeeTypesEn GetItem(FeeTypesEn argEn) { try { FeeTypesDAL loDs = new FeeTypesDAL(); return(loDs.GetItem(argEn)); } catch (Exception ex) { throw ex; } }
/// <summary> /// Method to Delete All FeeTypes /// </summary> /// <param name="argEn">FeeTypes Entity is an Input.FeeTypeCode ia an Input Property</param> /// <returns>Returns Boolean</returns> public bool FeeDelete(FeeTypesEn argEn) { bool flag; using (TransactionScope ts = new TransactionScope()) { try { FeeTypesDAL loDs = new FeeTypesDAL(); flag = loDs.FeeDelete(argEn); ts.Complete(); } catch (Exception ex) { throw ex; } } return(flag); }
/// <summary> /// Method to Get List of KokoCharges /// </summary> /// <param name="argEn">KokoCharges Entity is an Input.FTCode is an Input Property</param> /// <returns>Returns List of KokoCharges</returns> public List <KokoEn> Getkokobaru(FeeChargesEn argEn) { List <KokoEn> loEnList = new List <KokoEn>(); string sqlCmd = "select distinct kk.sako_code , kk.sako_description, kk.sako_status," + " local.sakod_feeamount as sakodfeeamountlocalin,local.sakod_gstin as sakodgstamountlocalin, local.sakod_feeamountout as sakodfeeamountlocalout," + " local.sakod_gstout as sakodfeegstamountlocalout, nonlocal.sakod_feeamount as sakodfeeamountinterin, nonlocal.sakod_gstin as sakodgstamountinterin, " + " nonlocal.sakod_feeamountout as sakodfeeamountinterout,nonlocal.sakod_gstout as sakodgstamountinterout, local.sakod_categorycode as LocalCategory," + " nonlocal.sakod_categorycode as NonLocalCategory,local.saft_code as saft_code,local.saft_taxmode as saft_taxmode from sas_kokorikulum kk inner join sas_feetypes ft on ft.saft_code = saft_code left join (select saft_code,sako_code,sakod_feeamount, sakod_feeamountout, sakod_gstin, sakod_gstout, " + " safd_type,sakod_categorycode,saft_taxmode from sas_kokorikulumdetails where sas_kokorikulumdetails.sakod_categorycode in ('W') )as local on local.sako_code = kk.sako_code and local.saft_code = ft.saft_code" + " left join (select saft_code,sako_code,sakod_feeamount, sakod_feeamountout, sakod_gstin, sakod_gstout,safd_type, sakod_categorycode,saft_taxmode from sas_kokorikulumdetails " + " where sas_kokorikulumdetails.sakod_categorycode in ('BW') )as nonlocal on nonlocal.sako_code = kk.sako_code and nonlocal.saft_code = ft.saft_code WHERE kk.sako_code = @SAKO_Code"; try { if (!FormHelp.IsBlank(sqlCmd)) { DbCommand cmd = _DatabaseFactory.GetDbCommand(Helper.GetDataBaseType, sqlCmd, DataBaseConnectionString); _DatabaseFactory.AddInParameter(ref cmd, "@SAKO_Code", DbType.String, argEn.FTCode); _DbParameterCollection = cmd.Parameters; using (IDataReader loReader = _DatabaseFactory.GetIDataReader(Helper.GetDataBaseType, cmd, DataBaseConnectionString, sqlCmd, _DbParameterCollection).CreateDataReader()) { while (loReader.Read()) { KokoEn loItem = new KokoEn(); FeeTypesDAL loDs = new FeeTypesDAL(); FeeTypesEn loEn = new FeeTypesEn(); loItem.sakod_idkoko = GetValue <int>(loReader, "saft_taxmode"); loItem.Code = GetValue <string>(loReader, "sako_code"); loItem.Saftcode = GetValue <string>(loReader, "saft_code"); loItem.LocalCategory = GetValue <string>(loReader, "LocalCategory"); loItem.NonLocalCategory = GetValue <string>(loReader, "NonLocalCategory"); int Tax = loItem.sakod_idkoko; loItem.taxmode = (GetGstMode(Tax)); if (loItem.taxmode == 2) { loItem.sakodfeeamountlocalin = GetValue <double>(loReader, "sakodfeeamountlocalin"); loItem.sakodfeeamountlocalout = GetValue <double>(loReader, "sakodfeeamountlocalout"); loItem.sakodgstamountlocalin = GetValue <double>(loReader, "sakodgstamountlocalin"); loItem.sakodfeegstamountlocalout = GetValue <double>(loReader, "sakodfeegstamountlocalout"); loItem.sakodfeeamountinterin = GetValue <double>(loReader, "sakodfeeamountinterin"); loItem.sakodfeeamountinterout = GetValue <double>(loReader, "sakodfeeamountinterout"); loItem.sakodgstamountinterin = GetValue <double>(loReader, "sakodgstamountinterin"); loItem.sakodgstamountinterout = GetValue <double>(loReader, "sakodgstamountinterout"); loItem.Local_TempAmount = loItem.sakodfeeamountlocalin - loItem.sakodgstamountlocalin; loItem.LocalTempAmount = loItem.sakodfeeamountlocalout - loItem.sakodfeegstamountlocalout; loItem.Inter_TempAmount = loItem.sakodfeeamountinterin - loItem.sakodgstamountinterin; loItem.NonLocalTempAmount = loItem.sakodfeeamountinterout - loItem.sakodgstamountinterout; loItem.totalfeelocalin = loItem.sakodfeeamountlocalin; loItem.totalfeelocalout = loItem.sakodfeeamountlocalout; loItem.totalfeeinterin = loItem.sakodfeeamountinterin; loItem.totalfeeinterout = loItem.sakodfeeamountinterout; } else if (loItem.taxmode == 1) { loItem.sakodgstamountlocalin = GetValue <double>(loReader, "sakodgstamountlocalin"); loItem.sakodfeegstamountlocalout = GetValue <double>(loReader, "sakodfeegstamountlocalout"); loItem.sakodgstamountinterin = GetValue <double>(loReader, "sakodgstamountinterin"); loItem.sakodgstamountinterout = GetValue <double>(loReader, "sakodgstamountinterout"); loItem.totalfeelocalin = GetValue <double>(loReader, "sakodfeeamountlocalin"); loItem.totalfeelocalout = GetValue <double>(loReader, "sakodfeeamountlocalout"); loItem.totalfeeinterin = GetValue <double>(loReader, "sakodfeeamountinterin"); loItem.totalfeeinterout = GetValue <double>(loReader, "sakodfeeamountinterout"); loItem.sakodfeeamountlocalin = loItem.totalfeelocalin - loItem.sakodgstamountlocalin; loItem.sakodfeeamountlocalout = loItem.totalfeelocalout - loItem.sakodfeegstamountlocalout; loItem.sakodfeeamountinterin = loItem.totalfeeinterin - loItem.sakodgstamountinterin; loItem.sakodfeeamountinterout = loItem.totalfeeinterout - loItem.sakodgstamountinterout; loItem.Local_TempAmount = loItem.totalfeelocalin - loItem.sakodgstamountlocalin; loItem.LocalTempAmount = loItem.totalfeelocalout - loItem.sakodfeegstamountlocalout; loItem.Inter_TempAmount = loItem.totalfeeinterin - loItem.sakodgstamountinterin; loItem.NonLocalTempAmount = loItem.totalfeeinterout - loItem.sakodgstamountinterout; } if (loItem.Saftcode != null) { loEnList.Add(loItem); } } loReader.Close(); } } } catch (Exception ex) { throw ex; } return(loEnList); }