コード例 #1
0
        public string AddUpdate(ClientModel c)
        {
            int    IntStatus = 0;
            string strStatus = "";

            if (c != null)
            {
                obj.IntClientID           = c.IntClientID;
                obj.StrClientCode         = c.StrClientCode;
                obj.IntCustomerID         = c.IntCustomerID;
                obj.FltInvestmentAmount   = c.FltInvestmentAmount;
                obj.IntClientPlanID       = c.IntClientPlanID;
                obj.IntReference_ClientID = c.IntReference_ClientID;
                obj.IntClientIsActive     = c.IntClientIsActive;
                obj.IntMode = c.IntMode;
                IntStatus   = obj.AddUpdate();
                if (IntStatus == 1)
                {
                    strStatus = "Client Added Successfully!";
                }
                if (IntStatus == 2)
                {
                    strStatus = "Client Updated Successfully!";
                }
                if (IntStatus == 3)
                {
                    strStatus = "Client Deleted Successfully!";
                }
                if (IntStatus == 4)
                {
                    strStatus = "Client Code Already Exist!";
                }
            }
            return(strStatus);
        }