Exemplo n.º 1
0
        public static List<DTO.FIC_Inc_Exp_Document> Get(int id, int referenceNo_, string inc_Exp_FormNo_)
        {
            List<DTO.FIC_Inc_Exp_Document> lsArray = new List<DTO.FIC_Inc_Exp_Document>();
            DataProvider.ConnectionVanTai conn = null;
            try
            {
                conn = new DataProvider.ConnectionVanTai();
                conn.Open();
                List<System.Data.SqlClient.SqlParameter> lsInput = new List<System.Data.SqlClient.SqlParameter>();
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@Inc_Exp_DocumentNo_", id));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@ReferenceNo_", referenceNo_));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@Inc_Exp_FormNo_", inc_Exp_FormNo_));
                System.Data.DataTable dt = conn.ExecuteNonQueryData("sp_FIC_Inc_Exp_Document_Get", lsInput);
                foreach (System.Data.DataRow row in dt.Rows)
                {
                    lsArray.Add(new DTO.FIC_Inc_Exp_Document(row));
                }

            }
            catch (Exception ex)
            {

            }
            finally
            {
                conn.Close();
            }
            return lsArray;
        }
Exemplo n.º 2
0
        public static int Create(DTO.SAM_SalesPrice item)
        {
            int result = 0;
            DataProvider.ConnectionVanTai conn = null;
            try
            {
                conn = new DataProvider.ConnectionVanTai();
                conn.Open();
                List<System.Data.SqlClient.SqlParameter> lsInput = new List<System.Data.SqlClient.SqlParameter>();
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@ID", item.ID));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@ContractNo_", item.ContractNo_.Trim()));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@RouteNo_", item.RouteNo_.Trim()));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@ItemNo_", item.ItemNo_.Trim()));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@UnitOfMeasure", item.UnitOfMeasure.Trim()));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@FromDate", item.FromDate));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@ToDate", item.ToDate));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@UnitPrice", item.UnitPrice));
                result = conn.ExecuteNonQuery("sp_SAM_SalesPrice_Create", lsInput);

            }
            catch (Exception ex)
            {
                result = -1;
            }
            finally
            {
                conn.Close();
            }
            return result;
        }
Exemplo n.º 3
0
        public static List<DTO.MAD_Transportation> Get(string id, string transportationName, int status, bool display)
        {
            List<DTO.MAD_Transportation> lsArray = new List<DTO.MAD_Transportation>();
            DataProvider.ConnectionVanTai conn = null;
            try
            {
                conn = new DataProvider.ConnectionVanTai();
                conn.Open();
                List<System.Data.SqlClient.SqlParameter> lsInput = new List<System.Data.SqlClient.SqlParameter>();
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@TransportationNo_", id));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@TransportationName", transportationName));                
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@Status", status));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@Display", display));
                System.Data.DataTable dt = conn.ExecuteNonQueryData("sp_MAD_Transportation_Get", lsInput);
                foreach (System.Data.DataRow row in dt.Rows)
                {
                    lsArray.Add(new DTO.MAD_Transportation(row));
                }

            }
            catch (Exception ex)
            {

            }
            finally
            {
                conn.Close();
            }
            return lsArray;
        }
Exemplo n.º 4
0
        public static int Create(DTO.MAD_Employee item)
        {
            int result = 0;
            DataProvider.ConnectionVanTai conn = null;
            try
            {
                conn = new DataProvider.ConnectionVanTai();
                conn.Open();
                List<System.Data.SqlClient.SqlParameter> lsInput = new List<System.Data.SqlClient.SqlParameter>();
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@EmployeeNo_", item.EmployeeNo_));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@EmployeeName", item.EmployeeName));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@EmployeeType", item.EmployeeType));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@IdentityCard", item.IdentityCard));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@Cellphone", item.Cellphone));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@BeginDate", item.BeginDate));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@Status", item.Status));
                result = conn.ExecuteNonQuery("sp_MAD_Employee_Create", lsInput);

            }
            catch (Exception ex)
            {
                result = -1;
            }
            finally
            {
                conn.Close();
            }
            return result;
        }
Exemplo n.º 5
0
        public static List<DTO.MAD_Employee> Get(string id)
        {
            List<DTO.MAD_Employee> lsArray = new List<DTO.MAD_Employee>();
            DataProvider.ConnectionVanTai conn = null;
            try
            {
                conn = new DataProvider.ConnectionVanTai();
                conn.Open();
                List<System.Data.SqlClient.SqlParameter> lsInput = new List<System.Data.SqlClient.SqlParameter>();
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@EmployeeNo_", id));
                System.Data.DataTable dt = conn.ExecuteNonQueryData("sp_MAD_Employee_Get", lsInput);
                foreach (System.Data.DataRow row in dt.Rows)
                {
                    lsArray.Add(new DTO.MAD_Employee(row));
                }

            }
            catch (Exception ex)
            {

            }
            finally
            {
                conn.Close();
            }
            return lsArray;
        }
Exemplo n.º 6
0
        public static List<DTO.SYS_Menu> Get(string menuNo_, int display)
        {
            List<DTO.SYS_Menu> lsArray = new List<DTO.SYS_Menu>();
            DataProvider.ConnectionVanTai conn = null;
            try
            {
                conn = new DataProvider.ConnectionVanTai();
                conn.Open();
                List<System.Data.SqlClient.SqlParameter> lsInput = new List<System.Data.SqlClient.SqlParameter>();
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@MenuNo_", menuNo_));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@Display", display));
                System.Data.DataTable dt = conn.ExecuteNonQueryData("sp_SYS_Menu_Get", lsInput);
                foreach (System.Data.DataRow row in dt.Rows)
                {
                    lsArray.Add(new DTO.SYS_Menu(row));
                }

            }
            catch (Exception ex)
            {

            }
            finally
            {
                conn.Close();
            }
            return lsArray;
        }
Exemplo n.º 7
0
        public static int Create(DTO.SAM_Contract item)
        {
            int result = 0;
            DataProvider.ConnectionVanTai conn = null;
            try
            {
                conn = new DataProvider.ConnectionVanTai();
                conn.Open();
                List<System.Data.SqlClient.SqlParameter> lsInput = new List<System.Data.SqlClient.SqlParameter>();
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@ContractNo_", item.ContractNo_.Trim()));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@CreatedUser", item.CreatedUser.Trim()));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@CreatedDate", item.CreatedDate));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@PartnerNo_", item.PartnerNo_.Trim()));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@ContractValue", item.ContractValue));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@Status", item.Status));
                result = conn.ExecuteNonQuery("sp_SAM_Contract_Create", lsInput);

            }
            catch (Exception ex)
            {
                result = -1;
            }
            finally
            {
                conn.Close();
            }
            return result;
        }
        public static List<DTO.FIC_ShippingVolumeHeader> Get(string sSVHeaderNo_, string invoiceNo_, string fromPartnerNo_, string toPartnerNo_, int status)
        {
            List<DTO.FIC_ShippingVolumeHeader> lsArray = new List<DTO.FIC_ShippingVolumeHeader>();
            DataProvider.ConnectionVanTai conn = null;
            try
            {
                conn = new DataProvider.ConnectionVanTai();
                conn.Open();
                List<System.Data.SqlClient.SqlParameter> lsInput = new List<System.Data.SqlClient.SqlParameter>();
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@SVHeaderNo_", sSVHeaderNo_));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@InvoiceNo_", invoiceNo_));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@FromPartnerNo_", fromPartnerNo_));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@ToPartnerNo_", toPartnerNo_));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@Status", status));
                System.Data.DataTable dt = conn.ExecuteNonQueryData("sp_FIC_ShippingVolumeHeader_Get", lsInput);
                foreach (System.Data.DataRow row in dt.Rows)
                {
                    lsArray.Add(new DTO.FIC_ShippingVolumeHeader(row));
                }

            }
            catch (Exception ex)
            {

            }
            finally
            {
                conn.Close();
            }
            return lsArray;
        }
Exemplo n.º 9
0
        public static int Create(DTO.FIC_Inc_Exp_Document item)
        {
            int result = 0;
            DataProvider.ConnectionVanTai conn = null;
            try
            {
                conn = new DataProvider.ConnectionVanTai();
                conn.Open();
                List<System.Data.SqlClient.SqlParameter> lsInput = new List<System.Data.SqlClient.SqlParameter>();
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@Inc_Exp_DocumentNo_", item.Inc_Exp_DocumentNo_));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@ReferenceNo_", item.ReferenceNo_));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@Inc_Exp_FormNo_", item.Inc_Exp_FormNo_.Trim()));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@Inc_Exp_Value", item.Inc_Exp_Value));
                result = conn.ExecuteNonQuery("sp_FIC_Inc_Exp_Document_Create", lsInput);

            }
            catch (Exception ex)
            {
                result = -1;
            }
            finally
            {
                conn.Close();
            }
            return result;
        }
Exemplo n.º 10
0
        public static List<DTO.SYS_User_View> Get(string userNo_)
        {
            List<DTO.SYS_User_View> lsArray = new List<DTO.SYS_User_View>();
            DataProvider.ConnectionVanTai conn = null;
            try
            {
                conn = new DataProvider.ConnectionVanTai();
                conn.Open();
                List<System.Data.SqlClient.SqlParameter> lsInput = new List<System.Data.SqlClient.SqlParameter>();
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@UserNo_", userNo_.Trim()));
                System.Data.DataTable dt = conn.ExecuteNonQueryData("sp_SYS_User_Get", lsInput);
                foreach (System.Data.DataRow row in dt.Rows)
                {
                    lsArray.Add(new DTO.SYS_User_View(row));
                }

            }
            catch (Exception ex)
            {

            }
            finally
            {
                conn.Close();
            }
            return lsArray;
        }
Exemplo n.º 11
0
        public static List<DTO.SAM_DriverShipment> Get(int shipmentNo_, string transportationNo_, string userNo_)
        {
            List<DTO.SAM_DriverShipment> lsArray = new List<DTO.SAM_DriverShipment>();
            DataProvider.ConnectionVanTai conn = null;
            try
            {
                conn = new DataProvider.ConnectionVanTai();
                conn.Open();
                List<System.Data.SqlClient.SqlParameter> lsInput = new List<System.Data.SqlClient.SqlParameter>();
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@ShipmentNo_", shipmentNo_));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@TransportationNo_", transportationNo_));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@UserNo_", userNo_));
                System.Data.DataTable dt = conn.ExecuteNonQueryData("sp_SAM_DriverShipment_Get", lsInput);
                foreach (System.Data.DataRow row in dt.Rows)
                {
                    lsArray.Add(new DTO.SAM_DriverShipment(row));
                }

            }
            catch (Exception ex)
            {

            }
            finally
            {
                conn.Close();
            }
            return lsArray;
        }
Exemplo n.º 12
0
        public static int Create(DTO.FIC_ShippingVolumeLine item)
        {
            int result = 0;
            DataProvider.ConnectionVanTai conn = null;
            try
            {
                conn = new DataProvider.ConnectionVanTai();
                conn.Open();
                List<System.Data.SqlClient.SqlParameter> lsInput = new List<System.Data.SqlClient.SqlParameter>();
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@LineNo_", item.LineNo_));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@SVHeaderNo_", item.SVHeaderNo_.Trim()));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@Date", item.Date));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@TransportationNo_", item.TransportationNo_.Trim()));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@RouteNo_", item.RouteNo_.Trim()));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@ItemNo_", item.ItemNo_.Trim()));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@UnitOfMeasureNo_", item.UnitOfMeasureNo_));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@Quantity", item.Quantity));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@UnitPrice", item.UnitPrice));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@Description", item.Description.Trim()));
                result = conn.ExecuteNonQuery("sp_FIC_ShippingVolumeLine_Create", lsInput);

            }
            catch (Exception ex)
            {
                result = -1;
            }
            finally
            {
                conn.Close();
            }
            return result;
        }
Exemplo n.º 13
0
        public static List<DTO.FIC_ShippingVolumeLine> Get(int id, string sSVHeaderNo_)
        {
            List<DTO.FIC_ShippingVolumeLine> lsArray = new List<DTO.FIC_ShippingVolumeLine>();
            DataProvider.ConnectionVanTai conn = null;
            try
            {
                conn = new DataProvider.ConnectionVanTai();
                conn.Open();
                List<System.Data.SqlClient.SqlParameter> lsInput = new List<System.Data.SqlClient.SqlParameter>();
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@LineNo_", id));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@SVHeaderNo_", sSVHeaderNo_));
                System.Data.DataTable dt = conn.ExecuteNonQueryData("sp_FIC_ShippingVolumeLine_Get", lsInput);
                foreach (System.Data.DataRow row in dt.Rows)
                {
                    lsArray.Add(new DTO.FIC_ShippingVolumeLine(row));
                }

            }
            catch (Exception ex)
            {

            }
            finally
            {
                conn.Close();
            }
            return lsArray;
        }
Exemplo n.º 14
0
        public static List<DTO.SAM_Order> Get(string id, int orderTypeNo_, string routeNo_, string contractNo_, DateTime? createdDate, int status, bool display)
        {
            List<DTO.SAM_Order> lsArray = new List<DTO.SAM_Order>();
            DataProvider.ConnectionVanTai conn = null;
            try
            {
                conn = new DataProvider.ConnectionVanTai();
                conn.Open();
                List<System.Data.SqlClient.SqlParameter> lsInput = new List<System.Data.SqlClient.SqlParameter>();
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@OrderNo_", id));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@OrderTypeNo_", orderTypeNo_));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@RouteNo_", routeNo_));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@ContractNo_", contractNo_));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@CreatedDate", createdDate));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@Status", status));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@Display", display));
                System.Data.DataTable dt = conn.ExecuteNonQueryData("sp_SAM_Order_Get", lsInput);
                foreach (System.Data.DataRow row in dt.Rows)
                {
                    lsArray.Add(new DTO.SAM_Order(row));
                }

            }
            catch (Exception ex)
            {

            }
            finally
            {
                conn.Close();
            }
            return lsArray;
        }
Exemplo n.º 15
0
        public static int Create(DTO.MAD_Transportation item)
        {
            int result = 0;
            DataProvider.ConnectionVanTai conn = null;
            try
            {
                conn = new DataProvider.ConnectionVanTai();
                conn.Open();
                List<System.Data.SqlClient.SqlParameter> lsInput = new List<System.Data.SqlClient.SqlParameter>();
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@TransportationNo_", item.TransportationNo_.Trim()));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@TransportationName", item.TransportationName.Trim()));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@RoMooc", item.RoMooc.Trim()));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@Status", item.Status));
                result = conn.ExecuteNonQuery("sp_MAD_Transportation_Create", lsInput);

            }
            catch (Exception ex)
            {
                result = -1;
            }
            finally
            {
                conn.Close();
            }
            return result;
        }
Exemplo n.º 16
0
        public static List<DTO.MAD_ActivityType> Get(int id, int ParentNo_, int UnActivityTypeNo_, int status, bool display)
        {
            List<DTO.MAD_ActivityType> lsArray = new List<DTO.MAD_ActivityType>();
            DataProvider.ConnectionVanTai conn = null;
            try
            {
                conn = new DataProvider.ConnectionVanTai();
                conn.Open();
                List<System.Data.SqlClient.SqlParameter> lsInput = new List<System.Data.SqlClient.SqlParameter>();
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@ActivityTypeNo_", id));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@ParentNo_", ParentNo_));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@UnActivityTypeNo_", UnActivityTypeNo_));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@Status", status));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@Display", display));
                System.Data.DataTable dt = conn.ExecuteNonQueryData("sp_MAD_ActivityType_Get", lsInput);
                foreach (System.Data.DataRow row in dt.Rows)
                {
                    lsArray.Add(new DTO.MAD_ActivityType(row));
                }

            }
            catch (Exception ex)
            {

            }
            finally
            {
                conn.Close();
            }
            return lsArray;
        }
Exemplo n.º 17
0
        public static int Create(DTO.SAM_DriverShipment item)
        {
            int result = 0;
            DataProvider.ConnectionVanTai conn = null;
            try
            {
                conn = new DataProvider.ConnectionVanTai();
                conn.Open();
                List<System.Data.SqlClient.SqlParameter> lsInput = new List<System.Data.SqlClient.SqlParameter>();
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@ShipmentNo_", item.ShipmentNo_));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@TransportationNo_", item.TransportationNo_));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@UserNo_", item.UserNo_));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@IsDriver", item.IsDriver));
                result = conn.ExecuteNonQuery("sp_SAM_DriverShipment_Create", lsInput);

            }
            catch (Exception ex)
            {
                result = -1;
            }
            finally
            {
                conn.Close();
            }
            return result;
        }
Exemplo n.º 18
0
        public static int Create(DTO.SYS_User item)
        {
            int result = 0;
            DataProvider.ConnectionVanTai conn = null;
            try
            {
                conn = new DataProvider.ConnectionVanTai();
                conn.Open();
                List<System.Data.SqlClient.SqlParameter> lsInput = new List<System.Data.SqlClient.SqlParameter>();
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@UserNo_", item.UserNo_.Trim()));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@EmployeeNo_", item.EmployeeNo_.Trim()));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@Password", item.Password.Trim()));
                result = conn.ExecuteNonQuery("sp_SYS_User_Create", lsInput);

            }
            catch (Exception ex)
            {
                result = -1;
            }
            finally
            {
                conn.Close();
            }
            return result;
        }
Exemplo n.º 19
0
        public static int Delete(int shipmentNo_, string transportationNo_, string userNo_)
        {
            int result = 0;
            DataProvider.ConnectionVanTai conn = null;
            try
            {
                conn = new DataProvider.ConnectionVanTai();
                conn.Open();
                List<System.Data.SqlClient.SqlParameter> lsInput = new List<System.Data.SqlClient.SqlParameter>();
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@ShipmentNo_", shipmentNo_));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@TransportationNo_", transportationNo_));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@UserNo_", userNo_));
                result = conn.ExecuteNonQuery("sp_SAM_DriverShipment_Delete", lsInput);

            }
            catch (Exception ex)
            {
                result = -1;
            }
            finally
            {
                conn.Close();
            }
            return result;
        }
Exemplo n.º 20
0
        public static DTO.SYS_User Login(string userNo_, string pasword)
        {
            DTO.SYS_User item = new DTO.SYS_User();
            DataProvider.ConnectionVanTai conn = null;
            try
            {
                conn = new DataProvider.ConnectionVanTai();
                conn.Open();
                List<System.Data.SqlClient.SqlParameter> lsInput = new List<System.Data.SqlClient.SqlParameter>();
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@UserNo_", userNo_.Trim()));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@Pasword", pasword.Trim()));
                System.Data.DataTable dt = conn.ExecuteNonQueryData("sp_SYS_User_Login", lsInput);
                if (dt.Rows.Count > 0)
                {
                    item = new DTO.SYS_User(dt.Rows[0]);
                }

            }
            catch (Exception ex)
            {

            }
            finally
            {
                conn.Close();
            }
            return item;
        }
Exemplo n.º 21
0
        public static int Create(DTO.FIC_ShippingVolumeHeader item)
        {
            int result = 0;
            DataProvider.ConnectionVanTai conn = null;
            try
            {
                conn = new DataProvider.ConnectionVanTai();
                conn.Open();
                List<System.Data.SqlClient.SqlParameter> lsInput = new List<System.Data.SqlClient.SqlParameter>();
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@SVHeaderNo_", item.SVHeaderNo_.Trim()));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@SVHeaderDate", item.SVHeaderDate));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@InvoiceNo_", item.InvoiceNo_.Trim()));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@InvoiceSerialNo_", item.InvoiceSerialNo_.Trim()));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@InvoiceFormNo_", item.InvoiceFormNo_.Trim()));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@InvoiceDate", item.InvoiceDate));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@ContractNo_", item.ContractNo_.Trim()));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@FromPartnerNo_", item.FromPartnerNo_.Trim()));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@ToPartnerNo_", item.ToPartnerNo_.Trim()));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@Status", item.Status));
                result = conn.ExecuteNonQuery("sp_FIC_ShippingVolumeHeader_Create", lsInput);

            }
            catch (Exception ex)
            {
                result = -1;
            }
            finally
            {
                conn.Close();
            }
            return result;
        }
Exemplo n.º 22
0
        public static List<DTO.SAM_SalesPrice_View> Get(int id, string ContractNo_, string RouteNo_, string ItemNo_, string UnitOfMeasure)
        {
            List<DTO.SAM_SalesPrice_View> lsArray = new List<DTO.SAM_SalesPrice_View>();
            DataProvider.ConnectionVanTai conn = null;
            try
            {
                conn = new DataProvider.ConnectionVanTai();
                conn.Open();
                List<System.Data.SqlClient.SqlParameter> lsInput = new List<System.Data.SqlClient.SqlParameter>();
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@ID", id));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@ContractNo_", ContractNo_));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@RouteNo_", RouteNo_));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@ItemNo_", ItemNo_));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@UnitOfMeasure", UnitOfMeasure));
                System.Data.DataTable dt = conn.ExecuteNonQueryData("sp_SAM_SalesPrice_Get", lsInput);
                foreach (System.Data.DataRow row in dt.Rows)
                {
                    lsArray.Add(new DTO.SAM_SalesPrice_View(row));
                }

            }
            catch (Exception ex)
            {

            }
            finally
            {
                conn.Close();
            }
            return lsArray;
        }
Exemplo n.º 23
0
        public static int Delete(string menuNo_)
        {
            int result = 0;
            DataProvider.ConnectionVanTai conn = null;
            try
            {
                conn = new DataProvider.ConnectionVanTai();
                conn.Open();
                List<System.Data.SqlClient.SqlParameter> lsInput = new List<System.Data.SqlClient.SqlParameter>();
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@MenuNo_", menuNo_));
                result = conn.ExecuteNonQuery("sp_SYS_Role_Delete_By_Employee", lsInput);

            }
            catch (Exception ex)
            {
                result = -1;
            }
            finally
            {
                conn.Close();
            }
            return result;
        }
Exemplo n.º 24
0
        public static int Delete(string id)
        {
            int result = 0;
            DataProvider.ConnectionVanTai conn = null;
            try
            {
                conn = new DataProvider.ConnectionVanTai();
                conn.Open();
                List<System.Data.SqlClient.SqlParameter> lsInput = new List<System.Data.SqlClient.SqlParameter>();
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@TransportationNo_", id));
                result = conn.ExecuteNonQuery("sp_MAD_Transportation_Delete", lsInput);

            }
            catch (Exception ex)
            {
                result = -1;
            }
            finally
            {
                conn.Close();
            }
            return result;
        }
Exemplo n.º 25
0
        public static int Create(DTO.SAM_Shipment item)
        {
            int result = 0;
            DataProvider.ConnectionVanTai conn = null;
            try
            {
                conn = new DataProvider.ConnectionVanTai();
                conn.Open();
                List<System.Data.SqlClient.SqlParameter> lsInput = new List<System.Data.SqlClient.SqlParameter>();
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@ShipmentNo_", item.ShipmentNo_));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@OrderNo_", item.OrderNo_.Trim()));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@TransportationNo_", item.TransportationNo_.Trim()));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@ShipmentTypeNo_", item.ShipmentTypeNo_));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@ShipmentPriority", item.ShipmentPriority));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@ItemNo_", item.ItemNo_.Trim()));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@UnitOfMeasure", item.UnitOfMeasure.Trim()));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@KmFrom", item.KmFrom));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@KmTo", item.KmTo));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@Quantity", item.Quantity));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@UnitPrice", item.UnitPrice));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@KgActual", item.KgActual));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@KgPartner", item.KgPartner));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@Payment", item.Payment));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@Status", item.Status));
                result = conn.ExecuteNonQuery("sp_SAM_Shipment_Create", lsInput);

            }
            catch (Exception ex)
            {
                result = -1;
            }
            finally
            {
                conn.Close();
            }
            return result;
        }
Exemplo n.º 26
0
        public static int Create(string transportationNo_, string employeeNo_)
        {
            int result = 0;
            DataProvider.ConnectionVanTai conn = null;
            try
            {
                conn = new DataProvider.ConnectionVanTai();
                conn.Open();
                List<System.Data.SqlClient.SqlParameter> lsInput = new List<System.Data.SqlClient.SqlParameter>();
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@TransportationNo_", transportationNo_.Trim()));
                lsInput.Add(new System.Data.SqlClient.SqlParameter("@EmployeeNo_", employeeNo_.Trim()));
                result = conn.ExecuteNonQuery("sp_MAD_Driver_Create_By_Employee", lsInput);

            }
            catch (Exception ex)
            {
                result = -1;
            }
            finally
            {
                conn.Close();
            }
            return result;
        }