Ejemplo n.º 1
0
        public virtual int Update(string ID, string EMP_ID, DateTime ORDED_DATE, string CUSTOMER_ID, string ORDER_CR_HR, string STS_ST_CLS, string STS_ST_SER, string SURFACE_CD, decimal ORD_THK, decimal ORD_WTH, string ORD_EDGE, decimal ORD_WGT, decimal BASE_PRICE, decimal EFFECT_PRICE, decimal BIDD_PRICE, string CONTRACT_NO, string ORD_USAGE, string ORD_STAT, string END_USER, int QUANTITY, string DELIVERY_TIME, string REMARK)
        {
            var sql = "UPDATE ORDERED SET EMP_ID=@EMP_ID, ORDED_DATE=@ORDED_DATE,CUSTOMER_ID=@CUSTOMER_ID,ORDER_CR_HR=@ORDER_CR_HR,STS_ST_CLS=@STS_ST_CLS,STS_ST_SER=@STS_ST_SER,SURFACE_CD=@SURFACE_CD,ORD_THK=@ORD_THK,ORD_WTH=@ORD_WTH,ORD_EDGE=@ORD_EDGE,ORD_WGT=@ORD_WGT,BASE_PRICE=@BASE_PRICE,EFFECT_PRICE=@EFFECT_PRICE,BIDD_PRICE=@BIDD_PRICE,CONTRACT_NO=@CONTRACT_NO,ORD_USAGE=@ORD_USAGE,ORD_STAT=@ORD_STAT,END_USER=@END_USER,QUANTITY=@QUANTITY,DELIVERY_TIME=@DELIVERY_TIME,REMARK=@REMARK WHERE ID=@ID";

            return(DBManager <ORDERED> .Execute(sql, new
            {
                ID = ID,
                EMP_ID = EMP_ID,
                ORDED_DATE = ORDED_DATE,
                CUSTOMER_ID = CUSTOMER_ID,
                ORDER_CR_HR = ORDER_CR_HR,
                STS_ST_CLS = STS_ST_CLS,
                STS_ST_SER = STS_ST_SER,
                SURFACE_CD = SURFACE_CD,
                ORD_THK = ORD_THK,
                ORD_WTH = ORD_WTH,
                ORD_EDGE = ORD_EDGE,
                ORD_WGT = ORD_WGT,
                BASE_PRICE = BASE_PRICE,
                EFFECT_PRICE = EFFECT_PRICE,
                BIDD_PRICE = BIDD_PRICE,
                CONTRACT_NO = CONTRACT_NO,
                ORD_USAGE = ORD_USAGE,
                ORD_STAT = ORD_STAT,
                QUANTITY = QUANTITY,
                END_USER = END_USER,
                REMARK = REMARK,
                DELIVERY_TIME = DELIVERY_TIME
            }));
        }
Ejemplo n.º 2
0
        public virtual int Insert(string EMP_ID, DateTime ORDED_DATE, string CUSTOMER_ID, string ORDER_CR_HR, string STS_ST_CLS, string STS_ST_SER,
                                  string SURFACE_CD, decimal ORD_THK, decimal ORD_WTH, string ORD_EDGE, decimal ORD_WGT, decimal BASE_PRICE, decimal EFFECT_PRICE,
                                  decimal BIDD_PRICE, string CONTRACT_NO, string ORD_USAGE, string ORD_STAT, string END_USER, int QUANTITY, string DELIVERY_TIME, string REMARK)
        {
            var id  = this.GenerateId();
            var sql = "INSERT INTO ORDERED(ID,EMP_ID,ORDED_DATE,CUSTOMER_ID,ORDER_CR_HR,STS_ST_CLS,STS_ST_SER,SURFACE_CD,ORD_THK,ORD_WTH,ORD_EDGE,ORD_WGT,BASE_PRICE,EFFECT_PRICE,BIDD_PRICE,CONTRACT_NO,ORD_USAGE,ORD_STAT,END_USER,QUANTITY,DELIVERY_TIME,REMARK,CREATE_AT) VALUES(@ID,@EMP_ID,@ORDED_DATE,@CUSTOMER_ID,@ORDER_CR_HR,@STS_ST_CLS,@STS_ST_SER,@SURFACE_CD,@ORD_THK,@ORD_WTH,@ORD_EDGE,@ORD_WGT,@BASE_PRICE,@EFFECT_PRICE,@BIDD_PRICE,@CONTRACT_NO,@ORD_USAGE,@ORD_STAT,@END_USER,@QUANTITY,@DELIVERY_TIME,@REMARK, GETDATE())";

            return(DBManager <ORDERED> .Execute(sql, new
            {
                ID = id,
                EMP_ID = EMP_ID,
                ORDED_DATE = ORDED_DATE,
                CUSTOMER_ID = CUSTOMER_ID,
                ORDER_CR_HR = ORDER_CR_HR,
                STS_ST_CLS = STS_ST_CLS,
                STS_ST_SER = STS_ST_SER,
                SURFACE_CD = SURFACE_CD,
                ORD_THK = ORD_THK,
                ORD_WTH = ORD_WTH,
                ORD_EDGE = ORD_EDGE,
                ORD_WGT = ORD_WGT,
                BASE_PRICE = BASE_PRICE,
                EFFECT_PRICE = EFFECT_PRICE,
                BIDD_PRICE = BIDD_PRICE,
                CONTRACT_NO = CONTRACT_NO,
                ORD_USAGE = ORD_USAGE,
                ORD_STAT = ORD_STAT,
                END_USER = END_USER,
                QUANTITY = QUANTITY,
                DELIVERY_TIME = DELIVERY_TIME,
                REMARK = REMARK
            }));
        }
Ejemplo n.º 3
0
        public int ResetPassword(string EMP_ID)
        {
            var password = this.Encode("123456");
            var sql      = "UPDATE EMPLOYEE SET PASSWORD=@PASSWORD WHERE EMP_ID=@EMP_ID";

            return(DBManager <EMPLOYEE> .Execute(sql, new { EMP_ID = EMP_ID, PASSWORD = password }));
        }
Ejemplo n.º 4
0
        public virtual int Update(string CUS_ID, string ID)
        {
            var sql = "UPDATE CUSTOMER SET PERSON=@ID WHERE ID=@CUS_ID";

            return(DBManager <CUSTOMER> .Execute(sql, new
            {
                ID = ID,
                CUS_ID = CUS_ID
            }));
        }
Ejemplo n.º 5
0
        public virtual int Delete(int ID = 0)
        {
            var sql = "DELETE FROM STD_CODE ";

            if (ID == 0)
            {
                return(DBManager <STD_CODE> .Execute(sql));
            }
            sql += " WHERE ID=@ID ";
            return(DBManager <STD_CODE> .Execute(sql, new { ID = ID }));
        }
Ejemplo n.º 6
0
        public virtual int Update(string EMP_ID, string VISIT_PLAN_MONTH, int VISIT_TARGET)
        {
            var sql = "UPDATE EMP_VISIT SET EMP_ID=@EMP_ID,VISIT_PLAN_MONTH=@VISIT_PLAN_MONTH,VISIT_TARGET=@VISIT_TARGET WHERE EMP_ID=@EMP_ID AND VISIT_PLAN_MONTH=@VISIT_PLAN_MONTH";

            return(DBManager <EMP_VISIT> .Execute(sql, new
            {
                EMP_ID = EMP_ID,
                VISIT_PLAN_MONTH = VISIT_PLAN_MONTH,
                VISIT_TARGET = VISIT_TARGET
            }));
        }
Ejemplo n.º 7
0
        public int Insert(string CUS_ID, string END_USER_ID, string NAME)
        {
            var sql = "INSERT INTO END_USER(CUS_ID, END_USER_ID,NAME) VALUES(@CUS_ID, @END_USER_ID,@NAME)";

            return(DBManager <END_USER> .Execute(sql, new
            {
                CUS_ID = CUS_ID,
                END_USER_ID = END_USER_ID,
                NAME = NAME
            }));
        }
Ejemplo n.º 8
0
        public virtual int Delete(string ID = "")
        {
            var sql = "DELETE FROM CONTACT ";

            if (string.IsNullOrWhiteSpace(ID))
            {
                return(DBManager <CONTACT> .Execute(sql));
            }
            sql += " WHERE ID=@ID ";
            return(DBManager <CONTACT> .Execute(sql, new { ID = ID }));
        }
Ejemplo n.º 9
0
        public virtual int Delete(int ID = 0)
        {
            var sql = "DELETE FROM EMP_VISIT ";

            if (ID == 0)
            {
                return(DBManager <EMP_VISIT> .Execute(sql));
            }
            sql += " WHERE ID=@ID ";
            return(DBManager <EMP_VISIT> .Execute(sql, new { ID = ID }));
        }
Ejemplo n.º 10
0
        public virtual int DeleteList(string ID, List <string> CUS)
        {
            var str = "(";

            foreach (var item in CUS)
            {
                str += "'" + item + "',";
            }
            var output = str.Remove(str.Length - 1, 1) + ")";
            var sql    = "DELETE FROM EMP_CUST WHERE EMP_ID=@ID AND CUST_ID IN " + output;

            return(DBManager <EMP_CUST> .Execute(sql, new { ID = ID }));
        }
Ejemplo n.º 11
0
        public virtual int Update(string EMP_ID, string EMP_NAME, string EMP_DEPT, string EMP_EMAIL, string EMP_MOBILE, int ROLE)
        {
            var sql = "UPDATE EMPLOYEE SET EMP_ID=@EMP_ID,EMP_NAME=@EMP_NAME,EMP_DEPT=@EMP_DEPT,EMP_EMAIL=@EMP_EMAIL,EMP_MOBILE=@EMP_MOBILE,ROLE=@ROLE WHERE EMP_ID=@EMP_ID";

            return(DBManager <EMPLOYEE> .Execute(sql, new
            {
                EMP_ID = EMP_ID,
                EMP_NAME = EMP_NAME,
                EMP_DEPT = EMP_DEPT,
                EMP_EMAIL = EMP_EMAIL,
                EMP_MOBILE = EMP_MOBILE,
                ROLE = ROLE
            }));
        }
Ejemplo n.º 12
0
        public virtual int Update(string ID, string NAME, string DOB, string POSITION, string MOBILE, string EMAIL, string SEX)
        {
            var sql = "UPDATE CONTACT SET NAME=@NAME,DOB=@DOB,POSITION=@POSITION,MOBILE=@MOBILE,EMAIL=@EMAIL,SEX=@SEX WHERE ID=@ID";

            return(DBManager <CUSTOMER> .Execute(sql, new
            {
                ID = ID,
                NAME = NAME,
                DOB = DOB,
                POSITION = POSITION,
                MOBILE = MOBILE,
                EMAIL = EMAIL,
                SEX = SEX
            }));
        }
Ejemplo n.º 13
0
        public virtual int Update(string EMP_ID, string CUSTOMER_ID, string CUST_CONTACTOR, DateTime?CONTACT_DATE, string CUST_VIST_TYPE, string CUST_VIST_PURPOSE, string VIST_REMARK, string ID)
        {
            var sql = "UPDATE VIST_CONTACTOR SET EMP_ID=@EMP_ID,CUSTOMER_ID=@CUSTOMER_ID,CUST_CONTACTOR=@CUST_CONTACTOR,CONTACT_DATE=@CONTACT_DATE,CUST_VIST_TYPE=@CUST_VIST_TYPE,CUST_VIST_PURPOSE=@CUST_VIST_PURPOSE,VIST_REMARK=@VIST_REMARK WHERE ID=@ID";

            return(DBManager <VIST_CONTACTOR> .Execute(sql, new
            {
                EMP_ID = EMP_ID,
                CUSTOMER_ID = CUSTOMER_ID,
                CUST_CONTACTOR = CUST_CONTACTOR,
                CONTACT_DATE = CONTACT_DATE,
                CUST_VIST_TYPE = CUST_VIST_TYPE,
                CUST_VIST_PURPOSE = CUST_VIST_PURPOSE,
                VIST_REMARK = VIST_REMARK,
                ID = ID
            }));
        }
Ejemplo n.º 14
0
        public virtual int Insert(string EMP_ID, string EMP_NAME, string EMP_DEPT, string EMP_EMAIL, string EMP_MOBILE, string PASSWORD, int ROLE)
        {
            PASSWORD = this.Encode(PASSWORD);
            var sql = "INSERT INTO EMPLOYEE(EMP_ID,EMP_NAME,EMP_DEPT,EMP_EMAIL,EMP_MOBILE,PASSWORD,ROLE) VALUES(@EMP_ID,@EMP_NAME,@EMP_DEPT,@EMP_EMAIL,@EMP_MOBILE,@PASSWORD,@ROLE)";

            return(DBManager <EMPLOYEE> .Execute(sql, new
            {
                EMP_ID = EMP_ID,
                EMP_NAME = EMP_NAME,
                EMP_DEPT = EMP_DEPT,
                EMP_EMAIL = EMP_EMAIL,
                EMP_MOBILE = EMP_MOBILE,
                PASSWORD = PASSWORD,
                ROLE = ROLE
            }));
        }
Ejemplo n.º 15
0
        public virtual int Insert(string CUS_ID, string NAME, string DOB, string POSITION, string MOBILE, string EMAIL, string SEX)
        {
            var CONT_ID = GenerateId();
            var sql     = "INSERT INTO CONTACT(ID,CUS_ID,NAME,DOB,POSITION,MOBILE,EMAIL,SEX) VALUES(@ID,@CUS_ID,@NAME,@DOB,@POSITION,@MOBILE,@EMAIL,@SEX)";

            return(DBManager <CUSTOMER> .Execute(sql, new
            {
                ID = CONT_ID,
                CUS_ID = CUS_ID,
                NAME = NAME,
                DOB = DOB,
                POSITION = POSITION,
                MOBILE = MOBILE,
                EMAIL = EMAIL,
                SEX = SEX
            }));
        }
Ejemplo n.º 16
0
        public virtual int Insert(string EMP_ID, string CUSTOMER_ID, string CUST_CONTACTOR, DateTime?CONTACT_DATE, string CUST_VIST_TYPE, string CUST_VIST_PURPOSE, string VIST_REMARK)
        {
            var ID  = GenerateId();
            var sql = "INSERT INTO VIST_CONTACTOR(ID,EMP_ID,CUSTOMER_ID,CUST_CONTACTOR,CONTACT_DATE,CUST_VIST_TYPE,CUST_VIST_PURPOSE,VIST_REMARK) VALUES(@ID,@EMP_ID,@CUSTOMER_ID,@CUST_CONTACTOR,@CONTACT_DATE,@CUST_VIST_TYPE,@CUST_VIST_PURPOSE,@VIST_REMARK)";

            return(DBManager <VIST_CONTACTOR> .Execute(sql, new
            {
                ID = ID,
                EMP_ID = EMP_ID,
                CUSTOMER_ID = CUSTOMER_ID,
                CUST_CONTACTOR = CUST_CONTACTOR,
                CONTACT_DATE = CONTACT_DATE,
                CUST_VIST_TYPE = CUST_VIST_TYPE,
                CUST_VIST_PURPOSE = CUST_VIST_PURPOSE,
                VIST_REMARK = VIST_REMARK
            }));
        }
Ejemplo n.º 17
0
        public int ChangeId(string CUS_ID, string OLD_ID)
        {
            var sql1 = "UPDATE CONTACT SET CUS_ID=@CUS_ID WHERE CUS_ID=@OLD_ID";
            var sql2 = "UPDATE CLAIM SET CUSTOMER_ID=@CUS_ID WHERE CUSTOMER_ID=@OLD_ID";
            var sql3 = "UPDATE END_USER SET CUS_ID=@CUS_ID WHERE CUS_ID=@OLD_ID";
            var sql4 = "UPDATE ORDERED SET CUSTOMER_ID=@CUS_ID WHERE CUSTOMER_ID=@OLD_ID";
            var sql5 = "UPDATE VIST_CONTACTOR SET CUSTOMER_ID=@CUS_ID WHERE CUSTOMER_ID=@OLD_ID";

            DBManager <CUSTOMER> .Execute(sql1, new
            {
                CUS_ID = CUS_ID,
                OLD_ID = OLD_ID
            });

            DBManager <CUSTOMER> .Execute(sql2, new
            {
                CUS_ID = CUS_ID,
                OLD_ID = OLD_ID
            });

            DBManager <CUSTOMER> .Execute(sql3, new
            {
                CUS_ID = CUS_ID,
                OLD_ID = OLD_ID
            });

            DBManager <CUSTOMER> .Execute(sql4, new
            {
                CUS_ID = CUS_ID,
                OLD_ID = OLD_ID
            });

            DBManager <CUSTOMER> .Execute(sql5, new
            {
                CUS_ID = CUS_ID,
                OLD_ID = OLD_ID
            });

            var sql = "UPDATE CUSTOMER SET ID=@CUS_ID WHERE ID=@OLD_ID";

            return(DBManager <CUSTOMER> .Execute(sql, new
            {
                CUS_ID = CUS_ID,
                OLD_ID = OLD_ID
            }));
        }
Ejemplo n.º 18
0
        public virtual int Update(string ID, string NAME, string ADDRESS, string LOCATION, string TEL, string FAX, string ESTABLE, string CONTACT,
                                  string CLASS, string APPLICATION, string PERSON, string SPEC, string TYPE)
        {
            var sql = "UPDATE CUSTOMER SET NAME=@NAME,ADDRESS=@ADDRESS,LOCATION=@LOCATION,TEL=@TEL,FAX=@FAX,ESTABLE=@ESTABLE,CONTACT=@CONTACT,CLASS=@CLASS,APPLICATION=@APPLICATION,PERSON=@PERSON,SPEC=@SPEC,TYPE=@TYPE WHERE ID=@ID";

            return(DBManager <CUSTOMER> .Execute(sql, new
            {
                ID = ID,
                NAME = NAME,
                ADDRESS = ADDRESS,
                LOCATION = LOCATION,
                TEL = TEL,
                FAX = FAX,
                ESTABLE = ESTABLE,
                CONTACT = CONTACT,
                CLASS = CLASS,
                APPLICATION = APPLICATION,
                PERSON = PERSON,
                SPEC = SPEC,
                TYPE = TYPE
            }));
        }
Ejemplo n.º 19
0
        public virtual int Insert(string ID, string NAME, string ADDRESS, string LOCATION, string TEL, string FAX, string ESTABLE, string CONTACT,
                                  string CLASS, string APPLICATION, string PERSON, string SPEC, string TYPE)
        {
            var sql = "INSERT INTO CUSTOMER(ID,NAME,ADDRESS,LOCATION,TEL,FAX,ESTABLE,CONTACT,CLASS,APPLICATION,PERSON,SPEC,TYPE) VALUES(@ID,@NAME,@ADDRESS,@LOCATION,@TEL,@FAX,@ESTABLE,@CONTACT,@CLASS,@APPLICATION,@PERSON,@SPEC,@TYPE)";

            return(DBManager <CUSTOMER> .Execute(sql, new
            {
                ID = ID,
                NAME = NAME,
                ADDRESS = ADDRESS,
                LOCATION = LOCATION,
                TEL = TEL,
                FAX = FAX,
                ESTABLE = ESTABLE,
                CONTACT = CONTACT,
                CLASS = CLASS,
                APPLICATION = APPLICATION,
                PERSON = PERSON,
                SPEC = SPEC,
                TYPE = TYPE
            }));
        }
Ejemplo n.º 20
0
        public virtual int Update(string EMP_ID, string CLAIM_NO, DateTime?CLAIM_DATE, string CUSTOMER_ID, string COIL_NO, decimal CLAIM_WGT,
                                  decimal NET_WGT, DateTime?VISIT_DATE, string DEFECT_CD, string DEFECT_LINE, DateTime?FINISH_DATE, decimal COMPENT, string REMARK,
                                  string STATUS, decimal COIL_THK, decimal COIL_WTH, string STS_ST_CLS, string SURFACE_CD, string GRADE, string DEFFECT_KIND,
                                  string END_USER, string SPEC, string TYPE, string ATTACHMENT = "")
        {
            var sql = string.Format(@"UPDATE CLAIM SET EMP_ID=@EMP_ID,TYPE=@TYPE,CLAIM_DATE=@CLAIM_DATE,CUSTOMER_ID=@CUSTOMER_ID,COIL_NO=@COIL_NO,
CLAIM_WGT=@CLAIM_WGT,NET_WGT=@NET_WGT,VISIT_DATE=@VISIT_DATE,DEFECT_CD=@DEFECT_CD,DEFECT_LINE=@DEFECT_LINE,FINISH_DATE=@FINISH_DATE,COMPENT=@COMPENT,
REMARK=@REMARK,STATUS=@STATUS,COIL_THK=@COIL_THK,COIL_WTH=@COIL_WTH,STS_ST_CLS=@STS_ST_CLS,SURFACE_CD=@SURFACE_CD,GRADE=@GRADE,
DEFFECT_KIND=@DEFFECT_KIND,END_USER=@END_USER,SPEC=@SPEC,ATTACHMENT=@ATTACHMENT WHERE CLAIM_NO=@CLAIM_NO");

            return(DBManager <CLAIM> .Execute(sql, new
            {
                EMP_ID = EMP_ID,
                CLAIM_NO = CLAIM_NO,
                CLAIM_DATE = CLAIM_DATE,
                CUSTOMER_ID = CUSTOMER_ID,
                COIL_NO = COIL_NO,
                CLAIM_WGT = CLAIM_WGT,
                NET_WGT = NET_WGT,
                VISIT_DATE = VISIT_DATE,
                DEFECT_CD = DEFECT_CD,
                DEFECT_LINE = DEFECT_LINE,
                FINISH_DATE = FINISH_DATE,
                COMPENT = COMPENT,
                REMARK = REMARK,
                STATUS = STATUS,
                COIL_THK = COIL_THK,
                COIL_WTH = COIL_WTH,
                STS_ST_CLS = STS_ST_CLS,
                SURFACE_CD = SURFACE_CD,
                GRADE = GRADE,
                DEFFECT_KIND = DEFFECT_KIND,
                END_USER = END_USER,
                SPEC = SPEC,
                TYPE = TYPE,
                ATTACHMENT = ATTACHMENT
            }));
        }
Ejemplo n.º 21
0
        public virtual int Insert(string EMP_ID, string CLAIM_NO, DateTime?CLAIM_DATE, string CUSTOMER_ID, string COIL_NO, decimal CLAIM_WGT,
                                  decimal NET_WGT, DateTime?VISIT_DATE, string DEFECT_CD, string DEFECT_LINE, DateTime?FINISH_DATE, decimal COMPENT, string REMARK,
                                  string STATUS, decimal COIL_THK, decimal COIL_WTH, string STS_ST_CLS, string SURFACE_CD, string GRADE, string DEFFECT_KIND,
                                  string END_USER, string SPEC, string TYPE, string ATTACHMENT = "")
        {
            CLAIM_NO = this.GenerateId();
            var sql = string.Format(@"
INSERT INTO CLAIM(EMP_ID,CLAIM_NO,CLAIM_DATE,CUSTOMER_ID,COIL_NO,CLAIM_WGT,NET_WGT,VISIT_DATE,DEFECT_CD,DEFECT_LINE,FINISH_DATE,COMPENT,REMARK,STATUS,
COIL_THK,COIL_WTH,SURFACE_CD,GRADE,DEFFECT_KIND,END_USER,SPEC,TYPE,ATTACHMENT) VALUES(@EMP_ID,@CLAIM_NO,@CLAIM_DATE,@CUSTOMER_ID,@COIL_NO,@CLAIM_WGT,@NET_WGT,
@VISIT_DATE,@DEFECT_CD,@DEFECT_LINE,@FINISH_DATE,@COMPENT,@REMARK,@STATUS,@COIL_THK,@COIL_WTH,@SURFACE_CD ,@GRADE,@DEFFECT_KIND,@END_USER,@SPEC,@TYPE,@ATTACHMENT)");

            return(DBManager <CLAIM> .Execute(sql, new
            {
                EMP_ID = EMP_ID,
                CLAIM_NO = CLAIM_NO,
                CLAIM_DATE = CLAIM_DATE,
                CUSTOMER_ID = CUSTOMER_ID,
                COIL_NO = COIL_NO,
                CLAIM_WGT = CLAIM_WGT,
                NET_WGT = NET_WGT,
                VISIT_DATE = VISIT_DATE,
                DEFECT_CD = DEFECT_CD,
                DEFECT_LINE = DEFECT_LINE,
                FINISH_DATE = FINISH_DATE,
                COMPENT = COMPENT,
                REMARK = REMARK,
                STATUS = STATUS,
                COIL_THK = COIL_THK,
                COIL_WTH = COIL_WTH,
                DEFFECT_KIND = DEFFECT_KIND,
                SURFACE_CD = SURFACE_CD,
                END_USER = END_USER,
                GRADE = GRADE,
                SPEC = SPEC,
                TYPE = TYPE,
                ATTACHMENT = ATTACHMENT
            }));
        }
Ejemplo n.º 22
0
        public virtual int Insert(string EMP_ID, string CUST_ID)
        {
            var sql = "INSERT INTO EMP_CUST(EMP_ID,CUST_ID) VALUES(@EMP_ID,@CUST_ID)";

            return(DBManager <EMP_CUST> .Execute(sql, new { EMP_ID = EMP_ID, CUST_ID = CUST_ID }));
        }
Ejemplo n.º 23
0
        public int ChangePassword(string EmpId, string pass, string newpass)
        {
            var sql = "UPDATE EMPLOYEE SET PASSWORD=@NEWPASS WHERE EMP_ID=@EMP_ID AND PASSWORD=@PASS";

            return(DBManager <EMPLOYEE> .Execute(sql, new { NEWPASS = newpass, EMP_ID = EmpId, PASS = pass }));
        }
Ejemplo n.º 24
0
        public virtual int Insert(string EMP_ID, string VISIT_PLAN_MONTH, int VISIT_TARGET, int VISIT_RESULT)
        {
            var sql = "INSERT INTO EMP_VISIT(EMP_ID,VISIT_PLAN_MONTH,VISIT_TARGET,VISIT_RESULT) VALUES(@EMP_ID,@VISIT_PLAN_MONTH,@VISIT_TARGET,@VISIT_RESULT)";

            return(DBManager <EMP_VISIT> .Execute(sql, new { EMP_ID = EMP_ID, VISIT_PLAN_MONTH = VISIT_PLAN_MONTH, VISIT_TARGET = VISIT_TARGET, VISIT_RESULT = VISIT_RESULT }));
        }
Ejemplo n.º 25
0
        public virtual int Update(string STD_CD_KIND, string STD_CD_NAME)
        {
            var sql = "UPDATE STD_CODE SET STD_CD_KIND=@STD_CD_KIND,STD_CD_NAME=@STD_CD_NAME WHERE ID=@ID";

            return(DBManager <STD_CODE> .Execute(sql, new { STD_CD_KIND = STD_CD_KIND, STD_CD_NAME = STD_CD_NAME }));
        }
Ejemplo n.º 26
0
        public virtual int Insert(string STD_CD_KIND, string STD_CD_NAME)
        {
            var sql = "INSERT INTO STD_CODE(STD_CD_KIND,STD_CD_NAME) VALUES(@STD_CD_KIND,@STD_CD_NAME)";

            return(DBManager <STD_CODE> .Execute(sql, new { STD_CD_KIND = STD_CD_KIND, STD_CD_NAME = STD_CD_NAME }));
        }
Ejemplo n.º 27
0
        public virtual int Update(string EMP_ID, string CUST_ID)
        {
            var sql = "UPDATE EMP_CUST SET EMP_ID=@EMP_ID,CUST_ID=@CUST_ID WHERE EMP_ID=@EMP_ID AND CUST_ID=@CUST";

            return(DBManager <EMP_CUST> .Execute(sql, new { EMP_ID = EMP_ID, CUST_ID = CUST_ID }));
        }