internal static SqlCommand Insert_Update_Import_Items(Import_Items objEntity)
        {
            string ip = System.Web.HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"];

            if (string.IsNullOrEmpty(ip))
            {
                ip = System.Web.HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];
            }

            var parameters = new[]
            {
                CreateParameter("@action", SqlDbType.VarChar, objEntity.action),
                CreateParameter("@ID", SqlDbType.Int, Convert.ToInt32(objEntity.ID)),
                CreateParameter("@ProjectCode", SqlDbType.VarChar, objEntity.ProjectCode),
                CreateParameter("@ScheduleNo", SqlDbType.VarChar, objEntity.ScheduleNo),
                CreateParameter("@SLNO", SqlDbType.VarChar, objEntity.SLNO),
                CreateParameter("@ItemDesc", SqlDbType.VarChar, objEntity.ItemDesc),
                CreateParameter("@ItemUnit", SqlDbType.VarChar, objEntity.ItemUnit),
                CreateParameter("@Qty", SqlDbType.Int, Convert.ToInt32(objEntity.Qty)),
                CreateParameter("@Rate", SqlDbType.Decimal, objEntity.Rate),
                CreateParameter("@Amount", SqlDbType.Decimal, objEntity.Amount),
                CreateParameter("@Flag", SqlDbType.Int, Convert.ToInt32(objEntity.Flag)),
                CreateParameter("@POStatus", SqlDbType.Int, Convert.ToInt32(objEntity.POStatus)),
                CreateParameter("@DCStatus", SqlDbType.Int, Convert.ToInt32(objEntity.DCStatus)),
                CreateParameter("@VendorCode", SqlDbType.VarChar, objEntity.VendorCode),
                CreateParameter("@CreatedBy", SqlDbType.Int, Convert.ToInt32(objEntity.CreatedBy)),
                CreateParameter("@CreatedDate", SqlDbType.VarChar, objEntity.CreatedDate),
                CreateParameter("@UpdatedBy", SqlDbType.Int, Convert.ToInt32(objEntity.UpdatedBy)),
                CreateParameter("@UpdatedDate", SqlDbType.VarChar, objEntity.UpdatedDate),
            };

            return(CreateCommand("ins_Import_Items", parameters));
        }
Beispiel #2
0
 public List <Import_Items> Insert_Update_Import_Items(Import_Items objEntity)
 {
     return(SqlHelpers.GetObjects <Import_Items>(Util.Env, CommandFactory.Insert_Update_Import_Items(objEntity), AdminObjectFactory.Insert_Update_Import_Items_Factory));
 }