示例#1
0
    int IBaseBOL.GetCount(SearchFilterCollection sFilterCols)
    {
        int    RecordCount = 1;
        string WhereCond   = Tools.GetCondition(sFilterCols).Replace("''", "'");
        var    ResultQuery = new DBToolsDataContext().spGetCount(TableOrViewName, WhereCond);

        RecordCount = (int)ResultQuery.ReturnValue;
        return(RecordCount);
    }
示例#2
0
    public int GetCount(SearchFilterCollection sFilterCols)
    {
        int RecordCount              = 1;
        DBToolsDataContext dcTools   = new DBToolsDataContext();
        string             WhereCond = Tools.GetCondition(sFilterCols);

        WhereCond = WhereCond.Replace("''", "'");
        string TableOrViewName = "Resources";
        var    ResultQuery     = dcTools.spGetCount(TableOrViewName, WhereCond);

        RecordCount = (int)ResultQuery.ReturnValue;
        return(RecordCount);
    }
示例#3
0
    public void UpdateVal(int ItemCode, int HCEntityCode, decimal RateVal, int RateCount)
    {
        DBToolsDataContext dc      = new DBToolsDataContext();
        ItemRates          CurRate = dc.ItemRates.SingleOrDefault(p => p.ItemCode.Equals(ItemCode) && p.HCEntityCode.Equals(HCEntityCode));

        if (CurRate == null)
        {
            CurRate = new ItemRates();
            dc.ItemRates.InsertOnSubmit(CurRate);
        }
        CurRate.ItemCode     = ItemCode;
        CurRate.HCEntityCode = HCEntityCode;
        CurRate.RateVal      = RateVal;
        CurRate.RateCount    = RateCount;
        dc.SubmitChanges();
    }
示例#4
0
    int IBaseBOL.GetCount(SearchFilterCollection sFilterCols)
    {
        //int RecordCount = 1;
        //DBToolsDataContext dcTools = new DBToolsDataContext();
        //string WhereCond = Tools.GetCondition(sFilterCols);
        //WhereCond = WhereCond.Replace("''", "'");
        //string TableOrViewName = "AccessGroups";
        //var ResultQuery = dcTools.spGetCount(TableOrViewName, WhereCond);
        //RecordCount = (int)ResultQuery.ReturnValue;
        //return RecordCount;

        int    RecordCount = 1;
        string WhereCond   = Tools.GetCondition(sFilterCols).Replace("''", "'");
        var    ResultQuery = new DBToolsDataContext().spGetCount(TableOrViewName, WhereCond);

        RecordCount = (int)ResultQuery.ReturnValue;
        return(RecordCount);
    }
    public int GetCount(SearchFilterCollection sFilterCols)
    {
        string             WhereCond;
        int                RecordCount = 1;
        DBToolsDataContext dcTools     = new DBToolsDataContext();

        WhereCond = Tools.GetCondition(sFilterCols);
        //if (WhereCond == "")
        //    WhereCond = " UserCode = " + MasterCode;
        //else
        //    WhereCond = " UserCode = " + MasterCode + " and " + WhereCond;

        WhereCond = WhereCond.Replace("''", "'");
        var ResultQuery = dcTools.spGetCount(TableOrViewName, WhereCond);

        RecordCount = (int)ResultQuery.ReturnValue;
        return(RecordCount);
    }
示例#6
0
    public ItemRates GetDetail(int ItemCode, int HCEntityCode)
    {
        DBToolsDataContext dc = new DBToolsDataContext();

        return(dc.ItemRates.SingleOrDefault(p => p.ItemCode.Equals(ItemCode) && p.HCEntityCode.Equals(HCEntityCode)));
    }