Exemplo n.º 1
0
        public bool Add(SysRolePermission dto)
        {
            bool   result = false;
            string sql    = "sp_SysRolePermission_Insert";


            List <SqlParameter> paramList = new List <SqlParameter>();

            paramList.Add(new SqlParameter("@RoleId", dto.RoleId));
            paramList.Add(new SqlParameter("@MenuId", dto.MenuId));
            paramList.Add(new SqlParameter("@PermissionId", dto.PermissionId));
            paramList.Add(new SqlParameter("@PermissionFlag", dto.PermissionFlag));



            try
            {
                result = webdb.ExcecuteNonQuery(sql, paramList);
            }
            catch (Exception ex)
            {
                throw new Exception("EV_Master_ConditionDAO.Insert::" + ex.ToString());
            }
            finally
            { }



            return(result);
        }
Exemplo n.º 2
0
        public bool Add(TransferStockDetail dto)
        {
            bool   result = false;
            string sql    = "sp_TransferStockDetail_Insert";


            List <SqlParameter> paramList = new List <SqlParameter>();

            paramList.Add(new SqlParameter("@TransferStockId", dto.TransferStockId));
            paramList.Add(new SqlParameter("@ProductId", dto.ProductId));
            paramList.Add(new SqlParameter("@RequestQty", dto.RequestQty));
            paramList.Add(new SqlParameter("@Seq", dto.Seq));
            paramList.Add(new SqlParameter("@WHId", dto.WHId));
            try
            {
                result = webdb.ExcecuteNonQuery(sql, paramList);
            }
            catch (Exception ex)
            {
                throw new Exception("sp_TransferStockDetail_Insert::" + ex.ToString());
            }
            finally
            { }
            return(result);
        }
Exemplo n.º 3
0
        public void DeleteBySQL(SysAccount acc)
        {
            bool   result = false;
            string sql    = "sp_SysAccount_Delete";


            List <SqlParameter> paramList = new List <SqlParameter>();



            try
            {
                paramList = new List <SqlParameter>();

                paramList.Add(new SqlParameter("@AccountId", acc.AccountId));

                webdb.ExcecuteNonQuery(sql, paramList);
            }
            catch (Exception ex)
            {
                throw new Exception("SysAccount.DeleteBySQL::" + ex.ToString());
            }
            finally
            { }
        }
Exemplo n.º 4
0
        public bool Add(TblInvoice dto)
        {
            bool   result = false;
            string sql    = "sp_Invoice_Insert";


            List <SqlParameter> paramList = new List <SqlParameter>();

            paramList.Add(new SqlParameter("@InvoiceNo", dto.InvoiceNo));
            paramList.Add(new SqlParameter("@SaleOrderId", dto.SaleOrderId));
            paramList.Add(new SqlParameter("@InvoiceRemark", dto.InvoiceRemark));
            paramList.Add(new SqlParameter("@InvoiceTerm", dto.InvoiceTerm));
            paramList.Add(new SqlParameter("@InvoiceAmount", dto.InvoiceAmount));
            paramList.Add(new SqlParameter("@ConditionId", dto.ConditionId));
            paramList.Add(new SqlParameter("@User", dto.CreatedBy));

            try
            {
                result = webdb.ExcecuteNonQuery(sql, paramList);
            }
            catch (Exception ex)
            {
                throw new Exception("sp_Invoice_Insert::" + ex.ToString());
            }
            finally
            { }
            return(result);
        }
Exemplo n.º 5
0
        public bool Add(TransferHeader ob)
        {
            bool   result = false;
            string sql    = "sp_TransferHeader_Insert";


            List <SqlParameter> paramList = new List <SqlParameter>();



            try
            {
                /*    @TransferId int
                 *
                 * , @TransferNo nvarchar(15)
                 * ,@TransferType nvarchar(3)
                 * ,@TransferDate nvarchar(50)
                 * ,@TransferTime nvarchar(5)
                 * ,@JobOrderId int
                 * , @RefTransferId int
                 *
                 * , @ReceiveTo nvarchar(50)
                 * ,@Reason nvarchar(100)
                 * ,@CarType int
                 * , @Company nvarchar(100)
                 * ,@CarNo nchar(10)
                 * ,@CarBrand nchar(10)
                 * ,@SendToDepartment int
                 * , @Remark nvarchar(100)
                 * ,@EmpId nvarchar(10)
                 * ,@BillNo nvarchar(50)
                 * ,@TransferStatus int
                 * , @Note1 varchar(50)
                 * ,@CreatedDate datetime
                 * , @CreatedBy int
                 *
                 * , @UpdatedDate datetime
                 * ,@UpdatedBy int
                 * , @ApprovedBy int
                 */

                paramList = new List <SqlParameter>();
                paramList.Add(new SqlParameter("@TransferId", ob.TransferId));
                paramList.Add(new SqlParameter("@TransferType", ob.TransferType));
                paramList.Add(new SqlParameter("@TransferDate", ob.TransferDate));
                paramList.Add(new SqlParameter("@TransferTime", ob.TransferTime));
                paramList.Add(new SqlParameter("@JobOrderId", ob.JobOrderId));
                paramList.Add(new SqlParameter("@RefTransferId", ob.RefTransferId));


                paramList.Add(new SqlParameter("@ReceiveTo", ob.ReceiveTo));
                paramList.Add(new SqlParameter("@Reason", ob.Reason));
                paramList.Add(new SqlParameter("@CarType", ob.CarType));
                paramList.Add(new SqlParameter("@Company", ob.Company));
                paramList.Add(new SqlParameter("@CarNo", ob.CarNo));
                paramList.Add(new SqlParameter("@CarBrand", ob.CarBrand));
                paramList.Add(new SqlParameter("@SendToDepartment", ob.SendToDepartment));
                paramList.Add(new SqlParameter("@Remark", ob.Remark));
                paramList.Add(new SqlParameter("@EmpId", ob.EmpId));
                paramList.Add(new SqlParameter("@BillNo", ob.BillNo));
                paramList.Add(new SqlParameter("@TransferStatus", ob.TransferStatus));
                paramList.Add(new SqlParameter("@Note1", ob.Note1));
                //   paramList.Add(new SqlParameter("@CreatedDate", ob.CreatedDate));
                paramList.Add(new SqlParameter("@CreatedBy", ob.CreatedBy));


                //   paramList.Add(new SqlParameter("@UpdatedDate", ob.CreatedBy));
                paramList.Add(new SqlParameter("@UpdatedBy", ob.CreatedBy));
                paramList.Add(new SqlParameter("@ApprovedBy", ob.CreatedBy));
                result = webdb.ExcecuteNonQuery(sql, paramList);


                result = webdb.ExcecuteNonQuery(sql, paramList);
            }
            catch (Exception ex)
            {
                throw new Exception("TransferDetail.Insert::" + ex.ToString());
            }
            finally
            { }



            return(result);
        }