public int PostUpDateAhwalMapping([FromBody] ahwalmapping frm)
        {
            int ret = 0;
            NpgsqlConnection cont = new NpgsqlConnection();

            cont.ConnectionString = constr;
            cont.Open();
            NpgsqlCommand cmd = new NpgsqlCommand();

            cmd.Connection  = cont;
            cmd.CommandText = "update ahwalmapping set ahwalid = " + frm.ahwalid + ",sectorid=" + frm.sectorid + ",citygroupid=" + frm.citygroupid + ",shiftid=" + frm.shiftid + ",patrolroleid=" + frm.patrolroleid + ",personid=" + frm.personid + " where ahwalmappingid = " + frm.ahwalmappingid;
            ret             = cmd.ExecuteNonQuery();
            cont.Close();
            cont.Dispose();
            return(ret);
        }
        public int PostAddAhwalMapping([FromBody] ahwalmapping frm)
        {
            int ret = 0;
            NpgsqlConnection cont = new NpgsqlConnection();

            cont.ConnectionString = constr;
            cont.Open();
            NpgsqlCommand cmd = new NpgsqlCommand();

            cmd.Connection  = cont;
            cmd.CommandText = "insert into ahwalmapping(ahwalid,sectorid,citygroupid,shiftid,patrolroleid,personid) values (" + frm.ahwalid + "," + frm.sectorid + "," + frm.citygroupid + "," + frm.shiftid + "," + frm.patrolroleid + "," + frm.personid + ")";
            ret             = cmd.ExecuteNonQuery();
            cont.Close();
            cont.Dispose();
            return(ret);
        }