Example #1
0
        public static IFwLine GetFLine(int ID)
        {
            string  strExecution = "[fwd].[uspGetLine]";
            IFwLine oIH          = null;

            using (DbQuery oDq = new DbQuery(strExecution))
            {
                oDq.AddIntegerParam("@LineId", ID);
                oDq.AddVarcharParam("@SortExpression", 30, "");
                oDq.AddVarcharParam("@SortDirection", 4, "");
                DataTableReader reader = oDq.GetTableReader();

                while (reader.Read())
                {
                    oIH = new fwLineEntity(reader);
                }
                reader.Close();
            }
            return(oIH);
        }
Example #2
0
        public static int AddEditFwLine(IFwLine Line, int CompanyId, string mode)
        {
            string strExecution = "[fwd].[uspManageLine]";
            int    Result       = 0;

            using (DbQuery oDq = new DbQuery(strExecution))
            {
                oDq.AddVarcharParam("@mode", 1, mode);
                oDq.AddIntegerParam("@UserID", Line.CreatedBy);
                oDq.AddIntegerParam("@CompanyID", CompanyId);
                oDq.AddIntegerParam("@fLineId", Line.LineID);
                oDq.AddVarcharParam("@fLineName", 50, Line.LineName);
                //oDq.AddVarcharParam("@fLineType", 20, Line.LineType);
                oDq.AddVarcharParam("@Prefix", 20, Line.Prefix);
                oDq.AddBooleanParam("@LineStatus", Line.LineStatus);
                oDq.AddIntegerParam("@Result", Result, QueryParameterDirection.Output);
                //oDq.AddIntegerParam("@LeaseId", outBookingId, QueryParameterDirection.Output);
                oDq.RunActionQuery();
                Result = Convert.ToInt32(oDq.GetParaValue("@Result"));
                ////JobId = Convert.ToInt32(oDq.GetParaValue("@JobId"));
            }
            return(Result);
        }
Example #3
0
 public int SaveFwLine(IFwLine Line, int fk_CompanyID, string mode)
 {
     return(fwLineDAL.AddEditFwLine(Line, fk_CompanyID, mode));
 }