public void Update(String KODEBPJ, String KODEKELENGKAPAN, DateTime TANGGALDITERIMA, String PENERIMAKELENGKAPAN)
        {
            KELENGKAPANPBJ item = new KELENGKAPANPBJ();

            item.KODEBPJ             = KODEBPJ;
            item.KODEKELENGKAPAN     = KODEKELENGKAPAN;
            item.TANGGALDITERIMA     = TANGGALDITERIMA;
            item.PENERIMAKELENGKAPAN = PENERIMAKELENGKAPAN;
            item.MarkOld();
            item.Save("");
        }
 private void SaveData()
 {
     item = new Data.KELENGKAPANPBJ();
     //	processing KODEBPJ - start
     if (!string.IsNullOrEmpty(Request["value_KODEBPJ"]))
     {
         item.KODEBPJ = Convert.ToString(Request["value_KODEBPJ"]);
     }
     //	processing KODEKELENGKAPAN - start
     if (!string.IsNullOrEmpty(Request["value_KODEKELENGKAPAN"]))
     {
         item.KODEKELENGKAPAN = Convert.ToString(Request["value_KODEKELENGKAPAN"]);
     }
     //	processing TANGGALDITERIMA - start
     if (!string.IsNullOrEmpty(Request["value_T
Esempio n. 3
0
        public static void SaveKELENGKAPANMap(string varKODEPBJ, string[] itemList)
        {
            QueryCommandCollection coll = new SubSonic.QueryCommandCollection();
            //delete out the existing
            QueryCommand cmdDel = new QueryCommand("DELETE FROM KELENGKAPANPBJ WHERE KODEBPJ=@KODEBPJ", PBJ.Schema.Provider.Name);

            cmdDel.AddParameter("@KODEBPJ", varKODEPBJ);
            coll.Add(cmdDel);
            DataService.ExecuteTransaction(coll);
            foreach (string item in itemList)
            {
                KELENGKAPANPBJ varKELENGKAPANPBJ = new KELENGKAPANPBJ();
                varKELENGKAPANPBJ.SetColumnValue("KODEBPJ", varKODEPBJ);
                varKELENGKAPANPBJ.SetColumnValue("KODEKELENGKAPAN", item);
                varKELENGKAPANPBJ.Save();
            }
        }
Esempio n. 4
0
        public static void SavePBJMap(string varKODEKELENGKAPAN, System.Web.UI.WebControls.ListItemCollection itemList)
        {
            QueryCommandCollection coll = new SubSonic.QueryCommandCollection();
            //delete out the existing
            QueryCommand cmdDel = new QueryCommand("DELETE FROM KELENGKAPANPBJ WHERE KODEKELENGKAPAN=@KODEKELENGKAPAN", KELENGKAPAN.Schema.Provider.Name);

            cmdDel.AddParameter("@KODEKELENGKAPAN", varKODEKELENGKAPAN);
            coll.Add(cmdDel);
            DataService.ExecuteTransaction(coll);
            foreach (System.Web.UI.WebControls.ListItem l in itemList)
            {
                if (l.Selected)
                {
                    KELENGKAPANPBJ varKELENGKAPANPBJ = new KELENGKAPANPBJ();
                    varKELENGKAPANPBJ.SetColumnValue("KODEKELENGKAPAN", varKODEKELENGKAPAN);
                    varKELENGKAPANPBJ.SetColumnValue("KODEBPJ", l.Value);
                    varKELENGKAPANPBJ.Save();
                }
            }
        }
Esempio n. 5
0
    private bool Init()
    {
        inlineedit = ((string)Request["editType"] == "inline");
        record_id  = (string)Request["recordID"];
        if (inlineedit)
        {
            templatefile = "KELENGKAPANPBJ_inline_edit.aspx";
        }
        else
        {
            templatefile = "KELENGKAPANPBJ_edit.aspx";
        }

        keys["KODEBPJ"]         = Request["editid1"];
        keys["KODEKELENGKAPAN"] = Request["editid2"];
        if (keys.Count > 1)
        {
            item = controller.FetchByManyID(keys);
        }
        else
        {
            item = Data.KELENGKAPANPBJ.FetchByID(Request["editid1"]);
        }

        if (item != null)
        {
            bool editable = true;
            if (!editable)
            {
                output.Append("<p>" + "You don't have permissions to access this table" + " <a href=\"KELENGKAPANPBJ_list.aspx?a=return\">back</a>");
                return(false);
            }
        }
        else
        {
            this.Server.Transfer("~/KELENGKAPANPBJ_list.aspx?a=return");
        }

        return(true);
    }
Esempio n. 6
0
    private void SaveData()
    {
        string   sOleh    = "";
        DateTime tgTerima = new DateTime(1970, 1, 1, 0, 0, 0, 1);

        if (RequestAction != "edited")
        {
            item = new Data.KELENGKAPANPBJ();
        }

        Data.KELENGKAPANPBJ emptyItem = new Data.KELENGKAPANPBJ();

        //	processing TANGGALDITERIMA - start
        if (!string.IsNullOrEmpty(Request["value_TANGGALDITERIMA"]))
        {
            item.TANGGALDITERIMA = Convert.ToDateTime(Request["value_TANGGALDITERIMA"]);
        }
        else
        {
            item.TANGGALDITERIMA = emptyItem.TANGGALDITERIMA;
        }
        tgTerima = Convert.ToDateTime(item.TANGGALDITERIMA);

        //	processing PENERIMAKELENGKAPAN - start
        if (!string.IsNullOrEmpty(Request["value_PENERIMAKELENGKAPAN"]))
        {
            item.PENERIMAKELENGKAPAN = Convert.ToString(Request["value_PENERIMAKELENGKAPAN"]);
        }
        else
        {
            item.PENERIMAKELENGKAPAN = emptyItem.PENERIMAKELENGKAPAN;
        }
        sOleh = Convert.ToString(item.PENERIMAKELENGKAPAN);

        //
        //item.KODEBPJ =  Convert.ToString(Request["editid1"]);
        //
        //item.KODEKELENGKAPAN =  Convert.ToString(Request["editid2"]);
        //
        string idx      = string.Empty;
        string sKodeBPJ = "";
        string sKodeLkp = "";

        idx                  = "1";
        item.KODEBPJ         = Convert.ToString(Request["editid" + idx]);
        idx                  = "2";
        item.KODEKELENGKAPAN = Convert.ToString(Request["editid" + idx]);
        bool abortSaving = false;

        if (!abortSaving)
        {
            item.MarkOld();
            //item.Save();
            idx                  = "1";
            item.KODEBPJ         = Convert.ToString(Request["editid" + idx]);
            sKodeBPJ             = Convert.ToString(item.KODEBPJ);
            idx                  = "2";
            item.KODEKELENGKAPAN = Convert.ToString(Request["editid" + idx]);
            sKodeLkp             = Convert.ToString(item.KODEKELENGKAPAN);
            Response.Redirect("ubah_kelengkapanpbj.aspx?pbj=" + sKodeBPJ + "&lkp=" + sKodeLkp + "&tgl=" + String.Format("{0:yyyy-MM-dd}", tgTerima) + "&oleh=" + sOleh);
            ShowSuccessMessage();
        }
    }