Example #1
0
        private void UpdateRecord(string agentId, int routeid, int categoryid, int typeid, int commodityid, string incentive, bool isActive)
        {
            int          result       = 0;
            DispatchData dispatchdata = new DispatchData();

            result = dispatchdata.AddAgentIncentive(agentId, routeid, categoryid, typeid, commodityid, incentive, isActive);
            if (result > 0)
            {
                divDanger.Visible   = false;
                divwarning.Visible  = false;
                divSusccess.Visible = true;
                lblSuccess.Text     = "Incentive Updated  Successfully";
                pnlError.Update();
                upMain.Update();
                uprouteList.Update();
            }
            else
            {
                divDanger.Visible   = false;
                divwarning.Visible  = true;
                divSusccess.Visible = false;
                lblwarning.Text     = "Please Contact to Site Admin";
                pnlError.Update();
            }
        }